Update app.py
Browse files
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}")
|