Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,10 +39,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 39 |
|
| 40 |
# Retrieve API keys from environment variables (Hugging Face Space Secrets)
|
| 41 |
try:
|
| 42 |
-
|
| 43 |
tavily_api_key = os.getenv("TAVILY_API_KEY")
|
| 44 |
|
| 45 |
-
if not
|
| 46 |
raise ValueError("DEEPSEEK_API_KEY secret not found. Please set it in your Space settings.")
|
| 47 |
if not tavily_api_key:
|
| 48 |
raise ValueError("TAVILY_API_KEY secret not found. Please set it in your Space settings.")
|
|
@@ -55,7 +55,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 55 |
# 2. Instantiate Agent
|
| 56 |
try:
|
| 57 |
# LLM: Use gpt-4o for its advanced reasoning and tool-use capabilities.
|
| 58 |
-
llm =
|
| 59 |
|
| 60 |
# Tools: A powerful combination of web search and a code interpreter.
|
| 61 |
tools = [
|
|
|
|
| 39 |
|
| 40 |
# Retrieve API keys from environment variables (Hugging Face Space Secrets)
|
| 41 |
try:
|
| 42 |
+
google_api_key = os.getenv("DEEPSEEK_API_KEY")
|
| 43 |
tavily_api_key = os.getenv("TAVILY_API_KEY")
|
| 44 |
|
| 45 |
+
if not google_api_key:
|
| 46 |
raise ValueError("DEEPSEEK_API_KEY secret not found. Please set it in your Space settings.")
|
| 47 |
if not tavily_api_key:
|
| 48 |
raise ValueError("TAVILY_API_KEY secret not found. Please set it in your Space settings.")
|
|
|
|
| 55 |
# 2. Instantiate Agent
|
| 56 |
try:
|
| 57 |
# LLM: Use gpt-4o for its advanced reasoning and tool-use capabilities.
|
| 58 |
+
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
|
| 59 |
|
| 60 |
# Tools: A powerful combination of web search and a code interpreter.
|
| 61 |
tools = [
|