lpolich commited on
Commit
36fea3e
·
verified ·
1 Parent(s): 76ce70e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -7
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
@@ -61,13 +61,19 @@ final_answer = FinalAnswerTool()
61
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
62
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
63
 
64
- model = HfApiModel(
65
- max_tokens=2096,
66
- temperature=0.5,
67
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
68
- custom_role_conversions=None,
69
- )
70
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
 
73
 
 
1
+ from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,LiteLLMModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
 
61
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
62
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
63
 
 
 
 
 
 
 
64
 
65
+ # model = HfApiModel(
66
+ # max_tokens=2096,
67
+ # temperature=0.5,
68
+ # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
69
+ # custom_role_conversions=None,
70
+ # )
71
+ model = LiteLLMModel(
72
+ # model_id="ollama_chat/qwen2:7b", # Or try other Ollama-supported models
73
+ model_id="gemma3:1b",
74
+ api_base="http://127.0.0.1:11434", # Default Ollama local server
75
+ num_ctx=8192,
76
+ )
77
 
78
 
79