Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -390,7 +390,7 @@ def generate_interaction_id(request):
|
|
390 |
|
391 |
def save_final_status(folder, status, details = None):
|
392 |
a = open(os.path.join(folder,"status.json"),"w")
|
393 |
-
a.write(json.dumps({"status":status,"details":
|
394 |
a.close()
|
395 |
|
396 |
def get_log_file_path(session_hash):
|
@@ -463,7 +463,7 @@ def run_agent_task(task_input, session_hash, request: gr.Request):
|
|
463 |
try:
|
464 |
# Run the agent
|
465 |
result = agent.run(full_task)
|
466 |
-
save_final_status(data_dir, "completed", details =
|
467 |
return f"Task completed: {result}", gr.update(visible=True), gr.update(visible=False)
|
468 |
|
469 |
except Exception as e:
|
|
|
390 |
|
391 |
def save_final_status(folder, status, details = None):
|
392 |
a = open(os.path.join(folder,"status.json"),"w")
|
393 |
+
a.write(json.dumps({"status":status,"details":details}))
|
394 |
a.close()
|
395 |
|
396 |
def get_log_file_path(session_hash):
|
|
|
463 |
try:
|
464 |
# Run the agent
|
465 |
result = agent.run(full_task)
|
466 |
+
save_final_status(data_dir, "completed", details = agent.memory.get_succinct_steps())
|
467 |
return f"Task completed: {result}", gr.update(visible=True), gr.update(visible=False)
|
468 |
|
469 |
except Exception as e:
|