Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -177,12 +177,21 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
177 |
# 2. Fetch Questions
|
178 |
print(f"Fetching questions from: {questions_url}")
|
179 |
try:
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
# 3. Run your Agent
|
188 |
results_log, answers_payload = [], []
|
|
|
177 |
# 2. Fetch Questions
|
178 |
print(f"Fetching questions from: {questions_url}")
|
179 |
try:
|
180 |
+
response = requests.get(questions_url, timeout=20)
|
181 |
+
response.raise_for_status()
|
182 |
+
questions_data = response.json()
|
183 |
+
print(f"Fetched {len(questions_data)} questions.")
|
184 |
+
|
185 |
+
# DEBUG: Print format of each question
|
186 |
+
print("\n=== QUESTION FORMATS DEBUG ===")
|
187 |
+
for i, item in enumerate(questions_data):
|
188 |
+
print(f"Question {i+1} keys: {list(item.keys())}")
|
189 |
+
print(f"Question {i+1} full data: {item}")
|
190 |
+
print("-" * 50)
|
191 |
+
print("=== END DEBUG ===\n")
|
192 |
+
|
193 |
+
except Exception as e:
|
194 |
+
return f"Error fetching questions: {e}", pd.DataFrame()
|
195 |
|
196 |
# 3. Run your Agent
|
197 |
results_log, answers_payload = [], []
|