Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -160,6 +160,8 @@ def orchestrate_workflow(image, nutritionix_key):
|
|
160 |
|
161 |
# Extract and format the final response from the chat
|
162 |
result = response[-1].get("content", "No output from agents.")
|
|
|
|
|
163 |
print(f"Total time: {time.time() - start:.2f}s")
|
164 |
return result
|
165 |
|
|
|
160 |
|
161 |
# Extract and format the final response from the chat
|
162 |
result = response[-1].get("content", "No output from agents.")
|
163 |
+
if isinstance(result, dict):
|
164 |
+
result = result.get("text", "No text output from agents.")
|
165 |
print(f"Total time: {time.time() - start:.2f}s")
|
166 |
return result
|
167 |
|