Sandiago21 commited on
Commit
133b2dc
·
verified ·
1 Parent(s): 26cebcc

Update app.py to comment out questions fetching

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -85,26 +85,26 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
85
  agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
86
  print(agent_code)
87
 
88
- # 2. Fetch Questions
89
- print(f"Fetching questions from: {questions_url}")
90
- try:
91
- response = requests.get(questions_url, timeout=15)
92
- response.raise_for_status()
93
- questions_data = response.json()
94
- if not questions_data:
95
- print("Fetched questions list is empty.")
96
- return "Fetched questions list is empty or invalid format.", None
97
- print(f"Fetched {len(questions_data)} questions.")
98
- except requests.exceptions.RequestException as e:
99
- print(f"Error fetching questions: {e}")
100
- return f"Error fetching questions: {e}", None
101
- except requests.exceptions.JSONDecodeError as e:
102
- print(f"Error decoding JSON response from questions endpoint: {e}")
103
- print(f"Response text: {response.text[:500]}")
104
- return f"Error decoding server response for questions: {e}", None
105
- except Exception as e:
106
- print(f"An unexpected error occurred fetching questions: {e}")
107
- return f"An unexpected error occurred fetching questions: {e}", None
108
 
109
 
110
 
 
85
  agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
86
  print(agent_code)
87
 
88
+ # # 2. Fetch Questions
89
+ # print(f"Fetching questions from: {questions_url}")
90
+ # try:
91
+ # response = requests.get(questions_url, timeout=15)
92
+ # response.raise_for_status()
93
+ # questions_data = response.json()
94
+ # if not questions_data:
95
+ # print("Fetched questions list is empty.")
96
+ # return "Fetched questions list is empty or invalid format.", None
97
+ # print(f"Fetched {len(questions_data)} questions.")
98
+ # except requests.exceptions.RequestException as e:
99
+ # print(f"Error fetching questions: {e}")
100
+ # return f"Error fetching questions: {e}", None
101
+ # except requests.exceptions.JSONDecodeError as e:
102
+ # print(f"Error decoding JSON response from questions endpoint: {e}")
103
+ # print(f"Response text: {response.text[:500]}")
104
+ # return f"Error decoding server response for questions: {e}", None
105
+ # except Exception as e:
106
+ # print(f"An unexpected error occurred fetching questions: {e}")
107
+ # return f"An unexpected error occurred fetching questions: {e}", None
108
 
109
 
110