Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ import wikipediaapi
|
|
| 10 |
import trafilatura
|
| 11 |
import gradio as gr
|
| 12 |
import pandas as pd
|
|
|
|
| 13 |
|
| 14 |
from smolagents import CodeAgent, LiteLLMModel, tool, DuckDuckGoSearchTool, FinalAnswerTool
|
| 15 |
|
|
@@ -183,6 +184,9 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 183 |
all_answers.append(submission_answer)
|
| 184 |
results_for_display.append({"Question": question_text, "Agent's Answer": agent_answer})
|
| 185 |
|
|
|
|
|
|
|
|
|
|
| 186 |
submission_file = "submission.jsonl"
|
| 187 |
with open(submission_file, 'w') as f:
|
| 188 |
for answer in all_answers:
|
|
@@ -208,7 +212,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 208 |
|
| 209 |
|
| 210 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 211 |
-
gr.Markdown("#
|
| 212 |
gr.Markdown("Inicia sesión con tu perfil de Hugging Face y haz clic en el botón para ejecutar tu agente en las 20 preguntas del examen y enviar tus resultados. La ejecución puede tardar varios minutos.")
|
| 213 |
|
| 214 |
login_button = gr.LoginButton()
|
|
|
|
| 10 |
import trafilatura
|
| 11 |
import gradio as gr
|
| 12 |
import pandas as pd
|
| 13 |
+
import time
|
| 14 |
|
| 15 |
from smolagents import CodeAgent, LiteLLMModel, tool, DuckDuckGoSearchTool, FinalAnswerTool
|
| 16 |
|
|
|
|
| 184 |
all_answers.append(submission_answer)
|
| 185 |
results_for_display.append({"Question": question_text, "Agent's Answer": agent_answer})
|
| 186 |
|
| 187 |
+
print("--- Pausando por 5 segundos para no exceder el límite de la API... ---")
|
| 188 |
+
time.sleep(5)
|
| 189 |
+
|
| 190 |
submission_file = "submission.jsonl"
|
| 191 |
with open(submission_file, 'w') as f:
|
| 192 |
for answer in all_answers:
|
|
|
|
| 212 |
|
| 213 |
|
| 214 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 215 |
+
gr.Markdown("# AZUFR3 AGENT DAEMON - Ecosistema de Agentes para el Examen Final de GAIA")
|
| 216 |
gr.Markdown("Inicia sesión con tu perfil de Hugging Face y haz clic en el botón para ejecutar tu agente en las 20 preguntas del examen y enviar tus resultados. La ejecución puede tardar varios minutos.")
|
| 217 |
|
| 218 |
login_button = gr.LoginButton()
|