Spaces:
Sleeping
Sleeping
Log paths
Browse files
app.py
CHANGED
@@ -84,15 +84,15 @@ def run_and_submit_all( profile: gr.OAuthProfile | None, mock_submission: bool =
|
|
84 |
continue
|
85 |
if "wiki" in question_text.lower() or "youtube" in question_text.lower():
|
86 |
continue
|
87 |
-
try:
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
except Exception as e:
|
94 |
-
|
95 |
-
|
96 |
|
97 |
if not answers_payload:
|
98 |
print("Agent did not produce any answers to submit.")
|
|
|
84 |
continue
|
85 |
if "wiki" in question_text.lower() or "youtube" in question_text.lower():
|
86 |
continue
|
87 |
+
# try:
|
88 |
+
# if file_path:
|
89 |
+
# question_text = question_text + f"\n\nHere is also the path to the file for the task (file name matches with task ID and is not in plain English): {file_path}"
|
90 |
+
# submitted_answer = agent(question_text)
|
91 |
+
# answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
92 |
+
# results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
93 |
+
# except Exception as e:
|
94 |
+
# print(f"Error running agent on task {task_id}: {e}")
|
95 |
+
# results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
96 |
|
97 |
if not answers_payload:
|
98 |
print("Agent did not produce any answers to submit.")
|
utils.py
CHANGED
@@ -20,6 +20,7 @@ def find_file_by_task_id(task_id: str, metadata_path: str = "Final_Assignment_Te
|
|
20 |
if not os.path.exists(metadata_path):
|
21 |
try:
|
22 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
23 |
metadata_path = os.path.join(current_dir, "validation", "metadata.jsonl")
|
24 |
except Exception as e:
|
25 |
raise FileNotFoundError(f"Metadata file not found at {metadata_path}")
|
|
|
20 |
if not os.path.exists(metadata_path):
|
21 |
try:
|
22 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
23 |
+
print("CURRENT DIR: ", current_dir)
|
24 |
metadata_path = os.path.join(current_dir, "validation", "metadata.jsonl")
|
25 |
except Exception as e:
|
26 |
raise FileNotFoundError(f"Metadata file not found at {metadata_path}")
|