Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -395,7 +395,7 @@ def process_and_query(input_language=None, audio_input=None, image_input=None, t
|
|
| 395 |
|
| 396 |
# Check if combined text is empty
|
| 397 |
if not combined_text.strip():
|
| 398 |
-
return "Error: Please provide some input (text, audio, or image)."
|
| 399 |
|
| 400 |
# Use the text to query Vectara
|
| 401 |
vectara_response_json = query_vectara(combined_text)
|
|
@@ -430,8 +430,9 @@ def process_and_query(input_language=None, audio_input=None, image_input=None, t
|
|
| 430 |
markdown_output += f"* **Label**: {hallucination_label}\n"
|
| 431 |
|
| 432 |
return markdown_output
|
|
|
|
| 433 |
except Exception as e:
|
| 434 |
-
return f"Error occurred during processing: {e}
|
| 435 |
|
| 436 |
|
| 437 |
|
|
|
|
| 395 |
|
| 396 |
# Check if combined text is empty
|
| 397 |
if not combined_text.strip():
|
| 398 |
+
return "Error: Please provide some input (text, audio, or image)."
|
| 399 |
|
| 400 |
# Use the text to query Vectara
|
| 401 |
vectara_response_json = query_vectara(combined_text)
|
|
|
|
| 430 |
markdown_output += f"* **Label**: {hallucination_label}\n"
|
| 431 |
|
| 432 |
return markdown_output
|
| 433 |
+
|
| 434 |
except Exception as e:
|
| 435 |
+
return f"Error occurred during processing: {e}. No hallucination evaluation."
|
| 436 |
|
| 437 |
|
| 438 |
|