Spaces:
Runtime error
Runtime error
minor changes
Browse files
src/gaia_solving_agent/agent.py
CHANGED
|
@@ -14,6 +14,7 @@ from gaia_solving_agent.tools import tavily_search_web, wikipedia_tool_spec
|
|
| 14 |
# Choice of the model
|
| 15 |
model_name = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
| 16 |
# model_name = "deepseek-ai/DeepSeek-R1-0528"
|
|
|
|
| 17 |
|
| 18 |
def get_llm(model_name=model_name):
|
| 19 |
return NebiusLLM(
|
|
|
|
| 14 |
# Choice of the model
|
| 15 |
model_name = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
| 16 |
# model_name = "deepseek-ai/DeepSeek-R1-0528"
|
| 17 |
+
# model_name = "mistralai/Mistral-Small-3.1-24B-Instruct-2503" # For VLM needs
|
| 18 |
|
| 19 |
def get_llm(model_name=model_name):
|
| 20 |
return NebiusLLM(
|
src/gaia_solving_agent/app.py
CHANGED
|
@@ -26,7 +26,7 @@ async def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 26 |
print("User not logged in.")
|
| 27 |
return "Please Login to Hugging Face with the button.", None
|
| 28 |
|
| 29 |
-
# 1. Instantiate Agent
|
| 30 |
agent, agent_code = instantiate_agent(space_id, timeout=20)
|
| 31 |
|
| 32 |
# 2. Fetch Questions
|
|
|
|
| 26 |
print("User not logged in.")
|
| 27 |
return "Please Login to Hugging Face with the button.", None
|
| 28 |
|
| 29 |
+
# 1. Instantiate Agent
|
| 30 |
agent, agent_code = instantiate_agent(space_id, timeout=20)
|
| 31 |
|
| 32 |
# 2. Fetch Questions
|
src/gaia_solving_agent/hf_submission_api.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import re
|
|
|
|
| 2 |
|
| 3 |
import pandas as pd
|
| 4 |
import requests
|
|
@@ -24,6 +25,7 @@ def instantiate_agent(space_id: str, **agent_kwargs):
|
|
| 24 |
return agent, agent_code
|
| 25 |
|
| 26 |
|
|
|
|
| 27 |
def fetching_questions(api_url: str = DEFAULT_API_URL):
|
| 28 |
questions_url = f"{api_url}/questions"
|
| 29 |
|
|
|
|
| 1 |
import re
|
| 2 |
+
from functools import lru_cache
|
| 3 |
|
| 4 |
import pandas as pd
|
| 5 |
import requests
|
|
|
|
| 25 |
return agent, agent_code
|
| 26 |
|
| 27 |
|
| 28 |
+
@lru_cache()
|
| 29 |
def fetching_questions(api_url: str = DEFAULT_API_URL):
|
| 30 |
questions_url = f"{api_url}/questions"
|
| 31 |
|
src/gaia_solving_agent/telemetry.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from getpass import getpass
|
| 2 |
|
| 3 |
import llama_index.core
|
|
@@ -11,6 +12,7 @@ from gaia_solving_agent import PHOENIX_API_KEY
|
|
| 11 |
# will be collected and displayed in Phoenix.
|
| 12 |
|
| 13 |
# setup Arize Phoenix for logging/observability
|
|
|
|
| 14 |
def set_telemetry(api_key=PHOENIX_API_KEY) -> None:
|
| 15 |
if api_key is None or "x" in api_key:
|
| 16 |
api_key = getpass("π Enter your Phoenix API key: ")
|
|
|
|
| 1 |
+
from functools import lru_cache
|
| 2 |
from getpass import getpass
|
| 3 |
|
| 4 |
import llama_index.core
|
|
|
|
| 12 |
# will be collected and displayed in Phoenix.
|
| 13 |
|
| 14 |
# setup Arize Phoenix for logging/observability
|
| 15 |
+
@lru_cache
|
| 16 |
def set_telemetry(api_key=PHOENIX_API_KEY) -> None:
|
| 17 |
if api_key is None or "x" in api_key:
|
| 18 |
api_key = getpass("π Enter your Phoenix API key: ")
|