Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -326,10 +326,8 @@ def process_summary_with_openai(summary):
|
|
326 |
except Exception as e:
|
327 |
return str(e)
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
try:
|
333 |
# Initialize the combined text
|
334 |
combined_text = ""
|
335 |
|
@@ -364,11 +362,9 @@ def process_and_query(input_language=None,audio_input=None,image_input=None,text
|
|
364 |
# Evaluate hallucination
|
365 |
hallucination_label = evaluate_hallucination(final_response, markdown_output)
|
366 |
|
367 |
-
# Return the processed summary along with the hallucination label
|
368 |
return final_response, hallucination_label
|
369 |
|
370 |
except Exception as e:
|
371 |
-
# Return a default value for both outputs in case of an exception
|
372 |
return str(e), "Error in processing"
|
373 |
|
374 |
|
|
|
326 |
except Exception as e:
|
327 |
return str(e)
|
328 |
|
329 |
+
def process_and_query(input_language=None, audio_input=None, image_input=None, text_input=None):
|
330 |
+
try:
|
|
|
|
|
331 |
# Initialize the combined text
|
332 |
combined_text = ""
|
333 |
|
|
|
362 |
# Evaluate hallucination
|
363 |
hallucination_label = evaluate_hallucination(final_response, markdown_output)
|
364 |
|
|
|
365 |
return final_response, hallucination_label
|
366 |
|
367 |
except Exception as e:
|
|
|
368 |
return str(e), "Error in processing"
|
369 |
|
370 |
|