AMfeta99 commited on
Commit
da6130f
·
verified ·
1 Parent(s): fa277d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -112,6 +112,10 @@ def generate_object_history(object_name):
112
  general_instruction,
113
  additional_args={"user_prompt": prompt}
114
  )
 
 
 
 
115
  image = result.to_raw()
116
  except Exception as e:
117
  print(f"Agent failed on {time_period}: {e}")
 
112
  general_instruction,
113
  additional_args={"user_prompt": prompt}
114
  )
115
+
116
+ if isinstance(result, (list, tuple)):
117
+ result = result[0]
118
+
119
  image = result.to_raw()
120
  except Exception as e:
121
  print(f"Agent failed on {time_period}: {e}")