Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -283,6 +283,15 @@ initial_state = {
|
|
283 |
}
|
284 |
|
285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
|
287 |
if __name__ == "__main__":
|
288 |
#demo.launch()
|
@@ -292,6 +301,11 @@ if __name__ == "__main__":
|
|
292 |
result = graph.invoke(initial_state)
|
293 |
print("[INFO] Workflow Execution Complete.")
|
294 |
print(f"[TRACE] Workflow Result: {result}") # Final workflow result
|
|
|
|
|
|
|
|
|
|
|
295 |
except Exception as e:
|
296 |
print(f"[ERROR] Workflow execution failed: {e}")
|
297 |
|
|
|
283 |
}
|
284 |
|
285 |
|
286 |
+
# Properly formatted second test state
|
287 |
+
second_test = {
|
288 |
+
"messages": [
|
289 |
+
HumanMessage(content="How is the weather in Sanfrancisco and Bangalore? Can you give research results") # Correct format for user input
|
290 |
+
]
|
291 |
+
,
|
292 |
+
"intermediate_steps": [] # Add this to track progress if needed
|
293 |
+
}
|
294 |
+
|
295 |
|
296 |
if __name__ == "__main__":
|
297 |
#demo.launch()
|
|
|
301 |
result = graph.invoke(initial_state)
|
302 |
print("[INFO] Workflow Execution Complete.")
|
303 |
print(f"[TRACE] Workflow Result: {result}") # Final workflow result
|
304 |
+
|
305 |
+
print(f"[TRACE] Initial workflow state: {second_test}")
|
306 |
+
result2 = graph.invoke(second_test)
|
307 |
+
print("[INFO] Workflow Execution Complete.")
|
308 |
+
print(f"[TRACE] Workflow Result: {result2}") # Final workflow result
|
309 |
except Exception as e:
|
310 |
print(f"[ERROR] Workflow execution failed: {e}")
|
311 |
|