Luis commited on
Commit
a36e0b7
·
verified ·
1 Parent(s): 97a656e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
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 = HfApiModel(
42
- max_tokens=2096,
43
- temperature=0.5,
44
- model_id='https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud',# it is possible that this model may be overloaded
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