pulkitme
commited on
Commit
·
2753697
1
Parent(s):
d9b21dc
gemini 2 flash with sleep between questions
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import requests
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
-
|
7 |
from google import genai
|
8 |
|
9 |
client = genai.Client(api_key=os.getenv("API_KEY"))
|
@@ -90,6 +90,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
90 |
continue
|
91 |
try:
|
92 |
submitted_answer = agent(question_text)
|
|
|
93 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
94 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
95 |
except Exception as e:
|
|
|
3 |
import requests
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
+
import time
|
7 |
from google import genai
|
8 |
|
9 |
client = genai.Client(api_key=os.getenv("API_KEY"))
|
|
|
90 |
continue
|
91 |
try:
|
92 |
submitted_answer = agent(question_text)
|
93 |
+
time.sleep(5)
|
94 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
95 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
96 |
except Exception as e:
|