Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -190,15 +190,9 @@ def process_pdf(uploaded_file, llm_model, n_criteria = num_criteria):
|
|
190 |
peer_journal_result = nlp_methods.find_journal_name(journal_result, peer_review_journals_list)
|
191 |
|
192 |
registration_result = nlp_methods.check_registration()
|
193 |
-
|
194 |
-
# Convert your asynchronous operations into a synchronous context using asyncio.run
|
195 |
-
async def async_evaluation():
|
196 |
-
# This assumes that evaluate_with_llm_async is an async version of your method
|
197 |
-
return await pdf_criteria_query.evaluate_with_llm_async(registration_result, peer_journal_result, eq_journal_result, queries)
|
198 |
-
|
199 |
|
200 |
# Evaluate with OpenAI model
|
201 |
-
total_score, criteria_met, score_percentage, reasoning =
|
202 |
|
203 |
reasoning_html = "<ul>"
|
204 |
for query, reason in zip(criteria, reasoning):
|
|
|
190 |
peer_journal_result = nlp_methods.find_journal_name(journal_result, peer_review_journals_list)
|
191 |
|
192 |
registration_result = nlp_methods.check_registration()
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
# Evaluate with OpenAI model
|
195 |
+
total_score, criteria_met, score_percentage, reasoning = pdf_criteria_query.evaluate_with_llm_async(registration_result, peer_journal_result, eq_journal_result, queries)
|
196 |
|
197 |
reasoning_html = "<ul>"
|
198 |
for query, reason in zip(criteria, reasoning):
|