Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
|
|
|
| 6 |
|
| 7 |
from smolagents import (
|
| 8 |
ToolCallingAgent,
|
|
@@ -179,21 +180,11 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 179 |
# 2. Fetch Questions
|
| 180 |
# -----------------------------------------------------
|
| 181 |
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
flush=True
|
| 185 |
-
)
|
| 186 |
-
|
| 187 |
try:
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
questions_url,
|
| 191 |
-
timeout=15
|
| 192 |
-
)
|
| 193 |
-
|
| 194 |
-
response.raise_for_status()
|
| 195 |
-
|
| 196 |
-
questions_data = response.json()
|
| 197 |
|
| 198 |
|
| 199 |
if not questions_data:
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
import json
|
| 7 |
|
| 8 |
from smolagents import (
|
| 9 |
ToolCallingAgent,
|
|
|
|
| 180 |
# 2. Fetch Questions
|
| 181 |
# -----------------------------------------------------
|
| 182 |
|
| 183 |
+
# 2. Fetch Questions
|
| 184 |
+
print("Loading questions from local JSON file...")
|
|
|
|
|
|
|
|
|
|
| 185 |
try:
|
| 186 |
+
with open("questions.json", "r", encoding="utf-8") as f:
|
| 187 |
+
questions_data = json.load(f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
|
| 190 |
if not questions_data:
|