Try one question at a time.
Browse files
app.py
CHANGED
|
@@ -17,13 +17,11 @@ class BasicAgent:
|
|
| 17 |
def __init__(self):
|
| 18 |
print("BasicAgent initialized.")
|
| 19 |
# Try multiple models in order of preference with better error handling
|
| 20 |
-
self.model_name = "
|
| 21 |
self.hf_token = os.getenv("HF_TOKEN") # Get token from environment if available
|
| 22 |
|
| 23 |
# List of fallback models (free models that don't require authentication)
|
| 24 |
-
self.fallback_models = [
|
| 25 |
-
"TinyLlama/TinyLlama-1.1B-Chat-v1.0"
|
| 26 |
-
]
|
| 27 |
|
| 28 |
try:
|
| 29 |
print(f"Attempting to initialize with model: {self.model_name}")
|
|
@@ -305,6 +303,8 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 305 |
print(f"Error running agent on task {task_id}: {e}")
|
| 306 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
| 307 |
|
|
|
|
|
|
|
| 308 |
if not answers_payload:
|
| 309 |
print("Agent did not produce any answers to submit.")
|
| 310 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
|
|
|
| 17 |
def __init__(self):
|
| 18 |
print("BasicAgent initialized.")
|
| 19 |
# Try multiple models in order of preference with better error handling
|
| 20 |
+
self.model_name = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
|
| 21 |
self.hf_token = os.getenv("HF_TOKEN") # Get token from environment if available
|
| 22 |
|
| 23 |
# List of fallback models (free models that don't require authentication)
|
| 24 |
+
self.fallback_models = []
|
|
|
|
|
|
|
| 25 |
|
| 26 |
try:
|
| 27 |
print(f"Attempting to initialize with model: {self.model_name}")
|
|
|
|
| 303 |
print(f"Error running agent on task {task_id}: {e}")
|
| 304 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
| 305 |
|
| 306 |
+
return
|
| 307 |
+
|
| 308 |
if not answers_payload:
|
| 309 |
print("Agent did not produce any answers to submit.")
|
| 310 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|