Spaces:
Runtime error
Runtime error
Update app.py
Browse filesfrom smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
app.py
CHANGED
@@ -1,16 +1,11 @@
|
|
1 |
-
from
|
2 |
-
from huggingface_hub import HfAgent
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
)
|
9 |
|
10 |
-
agent = HfAgent(
|
11 |
-
"https://api-inference.huggingface.co/models/bigcode/starcoder",
|
12 |
-
model=model
|
13 |
-
)
|
14 |
import datetime
|
15 |
import requests
|
16 |
import pytz
|
|
|
1 |
+
from smolagents import LiteLLMModel
|
|
|
2 |
|
3 |
+
model = LiteLLMModel(
|
4 |
+
model_id="ollama_chat/qwen3:0.6b", # Or try other Ollama-supported models
|
5 |
+
api_base="http://127.0.0.1:11434", # Default Ollama local server
|
6 |
+
num_ctx=8192,
|
7 |
+
)
|
8 |
|
|
|
|
|
|
|
|
|
9 |
import datetime
|
10 |
import requests
|
11 |
import pytz
|