Spaces:
Sleeping
Sleeping
dz
Browse files
app.py
CHANGED
@@ -54,8 +54,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
54 |
print(f"Error instantiating agent: {e}")
|
55 |
return f"Error initializing agent: {e}", None
|
56 |
# In the case of an app running as a hugging Face space, this link points toward your codebase ( usefull for others so please keep it public)
|
57 |
-
|
58 |
-
|
59 |
|
60 |
# 2. Fetch Questions
|
61 |
print(f"Fetching questions from: {questions_url}")
|
@@ -128,7 +128,7 @@ here is the task
|
|
128 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
129 |
|
130 |
# 4. Prepare Submission
|
131 |
-
submission_data = {"username": username.strip(), "agent_code":
|
132 |
status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."
|
133 |
print(status_update)
|
134 |
|
|
|
54 |
print(f"Error instantiating agent: {e}")
|
55 |
return f"Error initializing agent: {e}", None
|
56 |
# In the case of an app running as a hugging Face space, this link points toward your codebase ( usefull for others so please keep it public)
|
57 |
+
agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
58 |
+
print(agent_code)
|
59 |
|
60 |
# 2. Fetch Questions
|
61 |
print(f"Fetching questions from: {questions_url}")
|
|
|
128 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
129 |
|
130 |
# 4. Prepare Submission
|
131 |
+
submission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}
|
132 |
status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."
|
133 |
print(status_update)
|
134 |
|