Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -399,7 +399,12 @@ def process_and_query(input_language=None, audio_input=None, image_input=None, t
|
|
399 |
audio_output, translated_text = convert_text_to_speech(final_response, target_language, input_language)
|
400 |
|
401 |
print("Evaluating hallucination...")
|
402 |
-
|
|
|
|
|
|
|
|
|
|
|
403 |
|
404 |
markdown_output += "\n### Processed Summary with Qwen\n"
|
405 |
markdown_output += final_response + "\n"
|
@@ -412,7 +417,7 @@ def process_and_query(input_language=None, audio_input=None, image_input=None, t
|
|
412 |
|
413 |
except Exception as e:
|
414 |
print(f"Error occurred: {e}")
|
415 |
-
return f"Error occurred during processing: {e}.
|
416 |
|
417 |
|
418 |
def clear():
|
|
|
399 |
audio_output, translated_text = convert_text_to_speech(final_response, target_language, input_language)
|
400 |
|
401 |
print("Evaluating hallucination...")
|
402 |
+
try:
|
403 |
+
hallucination_label = evaluate_hallucination(final_response, summary)
|
404 |
+
except Exception as e:
|
405 |
+
print(f"Error in hallucination evaluation: {e}")
|
406 |
+
hallucination_label = "Evaluation skipped due to the model loading. For evaluation results, please try again in 29 minutes."
|
407 |
+
|
408 |
|
409 |
markdown_output += "\n### Processed Summary with Qwen\n"
|
410 |
markdown_output += final_response + "\n"
|
|
|
417 |
|
418 |
except Exception as e:
|
419 |
print(f"Error occurred: {e}")
|
420 |
+
return f"Error occurred during processing: {e}.", None
|
421 |
|
422 |
|
423 |
def clear():
|