tdurzynski commited on
Commit
740859e
·
verified ·
1 Parent(s): 077b164

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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