SadiaK14 pdx97 commited on
Commit
17a67d2
·
verified ·
1 Parent(s): 4610fb8

Update app.py (#1)

Browse files

- Update app.py (fd07f3cde42b32ef64d0c55161f795fbcbd1b817)


Co-authored-by: Prakhar Dixit <pdx97@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -1,4 +1,6 @@
1
- from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
 
 
2
  import datetime
3
  import requests
4
  import pytz
@@ -122,11 +124,16 @@ def get_current_time_in_timezone(timezone: str) -> str:
122
  final_answer = FinalAnswerTool()
123
 
124
  # Model setup
125
- model = HfApiModel(
126
- max_tokens=2096,
 
 
 
 
 
 
127
  temperature=0.5,
128
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct', # this model may be overloaded
129
- custom_role_conversions=None,
130
  )
131
 
132
  # Load tool from hub
 
1
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool, tool
2
+ from smolagents.models import HuggingFaceAPIModel
3
+
4
  import datetime
5
  import requests
6
  import pytz
 
124
  final_answer = FinalAnswerTool()
125
 
126
  # Model setup
127
+ # model = HfApiModel(
128
+ # max_tokens=2096,
129
+ # temperature=0.5,
130
+ # model_id='Qwen/Qwen2.5-Coder-32B-Instruct', # this model may be overloaded
131
+ # custom_role_conversions=None,
132
+ # )
133
+ model = HuggingFaceAPIModel(
134
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
135
  temperature=0.5,
136
+ max_new_tokens=2096,
 
137
  )
138
 
139
  # Load tool from hub