Spaces:
Sleeping
Sleeping
Luigi D'Addona
commited on
Commit
·
56c9ce6
1
Parent(s):
17a6ca8
aggiunto delay tra le invocazioni all'agent
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
|
|
|
| 6 |
|
| 7 |
from langchain_core.messages import HumanMessage
|
| 8 |
|
|
@@ -104,6 +105,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 104 |
print(f"Error running agent on task {task_id}: {e}")
|
| 105 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
| 106 |
|
|
|
|
|
|
|
| 107 |
if not answers_payload:
|
| 108 |
print("Agent did not produce any answers to submit.")
|
| 109 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
import time
|
| 7 |
|
| 8 |
from langchain_core.messages import HumanMessage
|
| 9 |
|
|
|
|
| 105 |
print(f"Error running agent on task {task_id}: {e}")
|
| 106 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
| 107 |
|
| 108 |
+
time.sleep(3)
|
| 109 |
+
|
| 110 |
if not answers_payload:
|
| 111 |
print("Agent did not produce any answers to submit.")
|
| 112 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|