Spaces:
Sleeping
Sleeping
bug fixing
Browse files- geminiAgent.py +2 -2
geminiAgent.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import time
|
| 3 |
import operator
|
| 4 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel, load_tool, tool, WikipediaSearchTool, LiteLLMModel
|
| 5 |
import datetime
|
| 6 |
import requests
|
| 7 |
import pytz
|
|
@@ -17,7 +17,7 @@ from PIL import Image
|
|
| 17 |
def create_agent():
|
| 18 |
return CodeAgent(
|
| 19 |
model=LiteLLMModel(model_id="gemini/gemini-2.0-flash-lite-001", api_key=os.getenv("GEMINI_KEY")),
|
| 20 |
-
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(), VisitWebpageTool(),
|
| 21 |
add_base_tools=True,
|
| 22 |
additional_authorized_imports=['pandas','numpy','csv','subprocess', 'exec']
|
| 23 |
)
|
|
|
|
| 1 |
import os
|
| 2 |
import time
|
| 3 |
import operator
|
| 4 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel, load_tool, tool, WikipediaSearchTool, LiteLLMModel
|
| 5 |
import datetime
|
| 6 |
import requests
|
| 7 |
import pytz
|
|
|
|
| 17 |
def create_agent():
|
| 18 |
return CodeAgent(
|
| 19 |
model=LiteLLMModel(model_id="gemini/gemini-2.0-flash-lite-001", api_key=os.getenv("GEMINI_KEY")),
|
| 20 |
+
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(), VisitWebpageTool(), ocr_tool, read_csv, read_excel],
|
| 21 |
add_base_tools=True,
|
| 22 |
additional_authorized_imports=['pandas','numpy','csv','subprocess', 'exec']
|
| 23 |
)
|