Spaces:
Runtime error
Runtime error
Connor Adams
commited on
Commit
·
3a9b248
1
Parent(s):
466697e
Rename agent
Browse files
agent.py
CHANGED
@@ -60,7 +60,7 @@ def youtube_analysis_tool(question: str, url: str) -> str | None:
|
|
60 |
except Exception as e:
|
61 |
raise RuntimeError(f"Processing failed: {str(e)}") from e
|
62 |
|
63 |
-
class
|
64 |
def _generate_final_answer(self, question: str, answer: str) -> str:
|
65 |
prompt = f"""
|
66 |
**Question:** {question}
|
|
|
60 |
except Exception as e:
|
61 |
raise RuntimeError(f"Processing failed: {str(e)}") from e
|
62 |
|
63 |
+
class GaiaAgent:
|
64 |
def _generate_final_answer(self, question: str, answer: str) -> str:
|
65 |
prompt = f"""
|
66 |
**Question:** {question}
|
app.py
CHANGED
@@ -4,7 +4,7 @@ import requests
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
|
7 |
-
from agent import
|
8 |
|
9 |
# (Keep Constants as is)
|
10 |
# --- Constants ---
|
@@ -32,7 +32,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
32 |
|
33 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
34 |
try:
|
35 |
-
agent =
|
36 |
except Exception as e:
|
37 |
print(f"Error instantiating agent: {e}")
|
38 |
return f"Error initializing agent: {e}", None
|
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
|
7 |
+
from agent import GaiaAgent
|
8 |
|
9 |
# (Keep Constants as is)
|
10 |
# --- Constants ---
|
|
|
32 |
|
33 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
34 |
try:
|
35 |
+
agent = GaiaAgent()
|
36 |
except Exception as e:
|
37 |
print(f"Error instantiating agent: {e}")
|
38 |
return f"Error initializing agent: {e}", None
|
test.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import sys
|
2 |
-
from agent import
|
3 |
|
4 |
-
agent =
|
5 |
|
6 |
# Get the question from command-line arguments
|
7 |
if len(sys.argv) > 1:
|
|
|
1 |
import sys
|
2 |
+
from agent import GaiaAgent
|
3 |
|
4 |
+
agent = GaiaAgent()
|
5 |
|
6 |
# Get the question from command-line arguments
|
7 |
if len(sys.argv) > 1:
|