vaseiss commited on
Commit
e5db03d
·
verified ·
1 Parent(s): b5f5c90

Update app.py

Browse files

from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool

Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -1,16 +1,11 @@
1
- from huggingface_hub.agents import LiteLLMModel
2
- from huggingface_hub import HfAgent
3
 
4
- # Подключаем Ollama
5
- model = LiteLLMModel(
6
- model="ollama/llama2",
7
- api_base="http://localhost:11434" # Для Spaces нужно указать внешний URL или использовать Docker
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