Spaces:
Sleeping
Sleeping
Test API directement dans l'app
Browse files
app.py
CHANGED
|
@@ -50,6 +50,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None, question_limit: int | N
|
|
| 50 |
print("Fetched questions list is empty.")
|
| 51 |
return "Fetched questions list is empty or invalid format.", None
|
| 52 |
print(f"Fetched {len(questions_data)} questions.")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
except requests.exceptions.RequestException as e:
|
| 54 |
print(f"Error fetching questions: {e}")
|
| 55 |
return f"Error fetching questions: {e}", None
|
|
|
|
| 50 |
print("Fetched questions list is empty.")
|
| 51 |
return "Fetched questions list is empty or invalid format.", None
|
| 52 |
print(f"Fetched {len(questions_data)} questions.")
|
| 53 |
+
for question in questions_data:
|
| 54 |
+
if question['file_name'] != '':
|
| 55 |
+
print(question['task_id'])
|
| 56 |
+
requests.get(f'{api_url}/files/{question['task_id']}')
|
| 57 |
except requests.exceptions.RequestException as e:
|
| 58 |
print(f"Error fetching questions: {e}")
|
| 59 |
return f"Error fetching questions: {e}", None
|