Naqi-airy commited on
Commit
828fda4
·
verified ·
1 Parent(s): ce76ba6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,5 +1,5 @@
1
  from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool
2
- from smolagents.models import InferenceClientModel
3
  from tools.final_answer import FinalAnswerTool
4
  from Gradio_UI import GradioUI
5
 
@@ -35,12 +35,11 @@ final_answer = FinalAnswerTool()
35
  # 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:
36
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
37
 
38
- model = InferenceClient(
39
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
40
  max_tokens=2096,
41
  temperature=0.5,
42
  )
43
-
44
  # Import tool from Hub
45
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
46
 
 
1
  from smolagents import CodeAgent, DuckDuckGoSearchTool, load_tool
2
+ from smolagents.models import HfApiModel
3
  from tools.final_answer import FinalAnswerTool
4
  from Gradio_UI import GradioUI
5
 
 
35
  # 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:
36
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
37
 
38
+ model = HfApiModel(
39
+ model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
40
  max_tokens=2096,
41
  temperature=0.5,
42
  )
 
43
  # Import tool from Hub
44
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
45