Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
|
|
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -60,6 +61,10 @@ custom_role_conversions=None,
|
|
| 60 |
)
|
| 61 |
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
# Import tool from Hub
|
| 64 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 65 |
|
|
|
|
| 1 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
+
from smolagents import LiteLLMModel # For Gemeni
|
| 3 |
import datetime
|
| 4 |
import requests
|
| 5 |
import pytz
|
|
|
|
| 61 |
)
|
| 62 |
|
| 63 |
|
| 64 |
+
model = LiteLLMModel(model_id="gemini/gemini-2.0-flash-lite", api_key=os.getenv(key="GEMINI_API_KEY"))
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
|
| 68 |
# Import tool from Hub
|
| 69 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 70 |
|