Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -156,15 +156,15 @@ class BasicAgent:
|
|
156 |
|
157 |
|
158 |
def create_mock_questions():
|
159 |
-
with open("data/A_photograph_captures_a_domestic_kitchen_scene_dur.png", "rb") as img_file:
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
return [{
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
}]
|
169 |
|
170 |
|
@@ -211,12 +211,14 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
211 |
# 2. Fetch Questions
|
212 |
print(f"Fetching questions from: {questions_url}")
|
213 |
try:
|
|
|
214 |
response = requests.get(questions_url, timeout=15)
|
215 |
response.raise_for_status()
|
216 |
total_questions = response.json()
|
217 |
print("\n\n")
|
218 |
print(f"total_questions: {total_questions}")
|
219 |
print("\n\n")
|
|
|
220 |
total_questions = create_mock_questions()
|
221 |
questions_data = total_questions[:NUMERO_DOMANDE_TOTALE]
|
222 |
if not questions_data:
|
|
|
156 |
|
157 |
|
158 |
def create_mock_questions():
|
159 |
+
#with open("data/A_photograph_captures_a_domestic_kitchen_scene_dur.png", "rb") as img_file:
|
160 |
+
# img_bytes = img_file.read()
|
161 |
+
# img_base64 = base64.b64encode(img_bytes).decode("utf-8")
|
162 |
+
|
163 |
+
return [{
|
164 |
+
"task_id":"cca530fc-4052-43b2-b130-b30968d8aa44",
|
165 |
+
"question":"Review the chess position provided in the image. It is black's turn. Provide the correct next move for black which guarantees a win. Please provide your response in algebraic notation.",
|
166 |
+
"Level":"1",
|
167 |
+
"file_name":"cca530fc-4052-43b2-b130-b30968d8aa44.png"
|
168 |
}]
|
169 |
|
170 |
|
|
|
211 |
# 2. Fetch Questions
|
212 |
print(f"Fetching questions from: {questions_url}")
|
213 |
try:
|
214 |
+
'''
|
215 |
response = requests.get(questions_url, timeout=15)
|
216 |
response.raise_for_status()
|
217 |
total_questions = response.json()
|
218 |
print("\n\n")
|
219 |
print(f"total_questions: {total_questions}")
|
220 |
print("\n\n")
|
221 |
+
'''
|
222 |
total_questions = create_mock_questions()
|
223 |
questions_data = total_questions[:NUMERO_DOMANDE_TOTALE]
|
224 |
if not questions_data:
|