Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, FinalAnswerTool,
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -21,11 +21,11 @@ def get_current_time_in_timezone(timezone:str)->str:
|
|
| 21 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 22 |
|
| 23 |
final_answer = FinalAnswerTool()
|
| 24 |
-
model =
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
)
|
| 30 |
|
| 31 |
image_generation_tool = load_tool("agents-course/text-to-image",trust_remote_code=True)
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, FinalAnswerTool, HfApiModel, load_tool, tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
|
|
| 21 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 22 |
|
| 23 |
final_answer = FinalAnswerTool()
|
| 24 |
+
model = HfApiModel(
|
| 25 |
+
max_tokens=2096,
|
| 26 |
+
temperature=0.5,
|
| 27 |
+
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
|
| 28 |
+
custom_role_conversions=None,
|
| 29 |
)
|
| 30 |
|
| 31 |
image_generation_tool = load_tool("agents-course/text-to-image",trust_remote_code=True)
|