Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -115,11 +115,15 @@ def gradio_interface(patient_info, query_type, image):
|
|
115 |
llm_response = submit_query(session_id, query)
|
116 |
|
117 |
# Debug: Print the full response to inspect it
|
118 |
-
print("LLM Response:", llm_response)
|
119 |
|
120 |
-
#
|
121 |
message = llm_response.get('data', {}).get('message', 'No message returned from LLM')
|
122 |
|
|
|
|
|
|
|
|
|
123 |
response = f"Patient Info: {patient_info}\nQuery Type: {query_type}\n\n{image_response}\n\nLLM Response:\n{message}"
|
124 |
return response
|
125 |
else:
|
|
|
115 |
llm_response = submit_query(session_id, query)
|
116 |
|
117 |
# Debug: Print the full response to inspect it
|
118 |
+
print("LLM Response:", llm_response) # This will print the full response for inspection
|
119 |
|
120 |
+
# Safely handle 'message' if it exists
|
121 |
message = llm_response.get('data', {}).get('message', 'No message returned from LLM')
|
122 |
|
123 |
+
# Check if message is empty and print the complete response if necessary
|
124 |
+
if message == 'No message returned from LLM':
|
125 |
+
print("Full LLM Response Data:", llm_response) # Inspect the full LLM response for any helpful info
|
126 |
+
|
127 |
response = f"Patient Info: {patient_info}\nQuery Type: {query_type}\n\n{image_response}\n\nLLM Response:\n{message}"
|
128 |
return response
|
129 |
else:
|