Update app.py
Browse files
app.py
CHANGED
|
@@ -96,7 +96,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 96 |
and displays the results.
|
| 97 |
"""
|
| 98 |
if not profile:
|
| 99 |
-
return "Please Login to Hugging Face with the button.", None
|
| 100 |
|
| 101 |
username = profile.username.strip()
|
| 102 |
print(f"👤 User logged in: {username}")
|
|
@@ -130,7 +130,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 130 |
results_log = []
|
| 131 |
answers_payload = []
|
| 132 |
|
| 133 |
-
print(f"🚀 Running agent on {len(questions_data)} questions... (this may take
|
| 134 |
|
| 135 |
for item in questions_data:
|
| 136 |
task_id = item.get("task_id")
|
|
@@ -174,4 +174,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 174 |
f"Message: {result_data.get('message', 'No message')}"
|
| 175 |
)
|
| 176 |
|
| 177 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
and displays the results.
|
| 97 |
"""
|
| 98 |
if not profile:
|
| 99 |
+
return "❌ Please Login to Hugging Face with the button.", None
|
| 100 |
|
| 101 |
username = profile.username.strip()
|
| 102 |
print(f"👤 User logged in: {username}")
|
|
|
|
| 130 |
results_log = []
|
| 131 |
answers_payload = []
|
| 132 |
|
| 133 |
+
print(f"🚀 Running agent on {len(questions_data)} questions... (this may take 5-15 minutes)")
|
| 134 |
|
| 135 |
for item in questions_data:
|
| 136 |
task_id = item.get("task_id")
|
|
|
|
| 174 |
f"Message: {result_data.get('message', 'No message')}"
|
| 175 |
)
|
| 176 |
|
| 177 |
+
return final_status, pd.DataFrame(results_log)
|
| 178 |
+
|
| 179 |
+
except Exception as e:
|
| 180 |
+
return f"❌ Submission Failed: {str(e)}", pd.DataFrame(results_log)
|