Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool,
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
import datetime
|
|
@@ -124,15 +125,15 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 124 |
final_answer = FinalAnswerTool()
|
| 125 |
|
| 126 |
# AI Model
|
| 127 |
-
model =
|
| 128 |
-
|
| 129 |
temperature=0.5,
|
| 130 |
-
|
| 131 |
-
custom_role_conversions=None,
|
| 132 |
)
|
| 133 |
|
| 134 |
|
| 135 |
|
|
|
|
| 136 |
# Load tool from hub
|
| 137 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 138 |
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, load_tool, tool
|
| 2 |
+
|
| 3 |
|
| 4 |
|
| 5 |
import datetime
|
|
|
|
| 125 |
final_answer = FinalAnswerTool()
|
| 126 |
|
| 127 |
# AI Model
|
| 128 |
+
model = InferenceClientModel(
|
| 129 |
+
model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 130 |
temperature=0.5,
|
| 131 |
+
max_new_tokens=2096,
|
|
|
|
| 132 |
)
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
+
|
| 137 |
# Load tool from hub
|
| 138 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 139 |
|