Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
14 |
class BasicAgent:
|
15 |
def __init__(self):
|
16 |
logging.info("BasicAgent initialized.")
|
17 |
-
self.api_token = os.getenv("
|
18 |
self.model = "google/flan-t5-large"
|
19 |
|
20 |
# Research-based hardcoded answers for specific task IDs based on feedback
|
@@ -188,7 +188,7 @@ def submit_answers(answers):
|
|
188 |
"""Submit answers to the GAIA API"""
|
189 |
try:
|
190 |
# Get space ID for agent_code
|
191 |
-
space_id = os.getenv("SPACE_ID", "
|
192 |
agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
193 |
|
194 |
# Convert answers dict to the expected format
|
@@ -200,7 +200,7 @@ def submit_answers(answers):
|
|
200 |
})
|
201 |
|
202 |
payload = {
|
203 |
-
"username": "
|
204 |
"agent_code": agent_code, # Add required agent_code
|
205 |
"answers": formatted_answers
|
206 |
}
|
|
|
14 |
class BasicAgent:
|
15 |
def __init__(self):
|
16 |
logging.info("BasicAgent initialized.")
|
17 |
+
self.api_token = os.getenv("HF_TOKEN")
|
18 |
self.model = "google/flan-t5-large"
|
19 |
|
20 |
# Research-based hardcoded answers for specific task IDs based on feedback
|
|
|
188 |
"""Submit answers to the GAIA API"""
|
189 |
try:
|
190 |
# Get space ID for agent_code
|
191 |
+
space_id = os.getenv("SPACE_ID", "ChockqOteewy/llm-multi-tool-agent")
|
192 |
agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
193 |
|
194 |
# Convert answers dict to the expected format
|
|
|
200 |
})
|
201 |
|
202 |
payload = {
|
203 |
+
"username": "ChockqOteewy", # Add required username
|
204 |
"agent_code": agent_code, # Add required agent_code
|
205 |
"answers": formatted_answers
|
206 |
}
|