p3pp01 commited on
Commit
9c9d274
·
1 Parent(s): ab0edf2
Files changed (2) hide show
  1. app.py +6 -13
  2. requirements.txt +1 -3
app.py CHANGED
@@ -12,8 +12,6 @@ from dotenv import load_dotenv
12
  from tools.final_answer import FinalAnswerTool
13
  from tools.weather import WeatherTool
14
  from tools.web_search import DuckDuckGoSearchTool
15
- from transformers import AutoModelForCausalLM, AutoTokenizer
16
-
17
 
18
  from Gradio_UI import GradioUI
19
 
@@ -55,17 +53,12 @@ web_search = DuckDuckGoSearchTool()
55
  # 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:
56
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
57
 
58
- # model = HfApiModel(
59
- # max_tokens=2096,
60
- # temperature=0.5,
61
- # # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
62
- # custom_role_conversions=None,
63
- # )
64
-
65
- checkpoint = "HuggingFaceTB/SmolLM3-3B"
66
-
67
- tokenizer = AutoTokenizer.from_pretrained(checkpoint)
68
- model = AutoModelForCausalLM.from_pretrained(checkpoint)
69
 
70
 
71
  # Import tool from Hub
 
12
  from tools.final_answer import FinalAnswerTool
13
  from tools.weather import WeatherTool
14
  from tools.web_search import DuckDuckGoSearchTool
 
 
15
 
16
  from Gradio_UI import GradioUI
17
 
 
53
  # 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:
54
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
55
 
56
+ model = HfApiModel(
57
+ max_tokens=2096,
58
+ temperature=0.5,
59
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
60
+ custom_role_conversions=None,
61
+ )
 
 
 
 
 
62
 
63
 
64
  # Import tool from Hub
requirements.txt CHANGED
@@ -2,6 +2,4 @@ markdownify
2
  smolagents==1.13.0
3
  requests
4
  duckduckgo_search
5
- pandas
6
- transformers
7
- pytorch
 
2
  smolagents==1.13.0
3
  requests
4
  duckduckgo_search
5
+ pandas