Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import os
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import inspect
|
|
@@ -94,9 +95,11 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 94 |
# 2. Fetch Questions
|
| 95 |
print(f"Fetching questions from: {questions_url}")
|
| 96 |
try:
|
| 97 |
-
response = requests.get(questions_url, timeout=60)
|
| 98 |
-
response.raise_for_status()
|
| 99 |
-
questions_data = response.json()
|
|
|
|
|
|
|
| 100 |
if not questions_data:
|
| 101 |
print("Fetched questions list is empty.")
|
| 102 |
return "Fetched questions list is empty or invalid format.", None
|
|
|
|
| 1 |
import os
|
| 2 |
+
import json
|
| 3 |
import gradio as gr
|
| 4 |
import requests
|
| 5 |
import inspect
|
|
|
|
| 95 |
# 2. Fetch Questions
|
| 96 |
print(f"Fetching questions from: {questions_url}")
|
| 97 |
try:
|
| 98 |
+
# response = requests.get(questions_url, timeout=60)
|
| 99 |
+
# response.raise_for_status()
|
| 100 |
+
# questions_data = response.json()
|
| 101 |
+
with open('questions.json') as f:
|
| 102 |
+
questions_data = json.load(f)
|
| 103 |
if not questions_data:
|
| 104 |
print("Fetched questions list is empty.")
|
| 105 |
return "Fetched questions list is empty or invalid format.", None
|