Spaces:
Runtime error
Runtime error
Luis
commited on
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
|
|
@@ -38,14 +39,15 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 38 |
|
| 39 |
|
| 40 |
final_answer = FinalAnswerTool()
|
| 41 |
-
model =
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
custom_role_conversions=None,
|
| 46 |
)
|
| 47 |
|
| 48 |
|
|
|
|
|
|
|
| 49 |
# Import tool from Hub
|
| 50 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 51 |
|
|
|
|
| 1 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
+
from smolagents.model import AnthropicModel
|
| 3 |
import datetime
|
| 4 |
import requests
|
| 5 |
import pytz
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
final_answer = FinalAnswerTool()
|
| 42 |
+
model = AnthropicModel(
|
| 43 |
+
model="claude-3-sonnet-20240229", # or any other Claude model
|
| 44 |
+
max_tokens=2096,
|
| 45 |
+
temperature=0.5
|
|
|
|
| 46 |
)
|
| 47 |
|
| 48 |
|
| 49 |
+
|
| 50 |
+
|
| 51 |
# Import tool from Hub
|
| 52 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 53 |
|