yangminded commited on
Commit
c9542b2
·
verified ·
1 Parent(s): c4d7fbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,7 +4,7 @@ import requests
4
  import inspect
5
  import pandas as pd
6
 
7
- from smolagents import login, CodeAgent,DuckDuckGoSearchTool, InferenceClientModel, PromptTemplates, EMPTY_PROMPT_TEMPLATES
8
  from tools.final_answer import FinalAnswerTool
9
  import yaml
10
 
@@ -20,8 +20,7 @@ class BasicAgent:
20
 
21
  # 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:
22
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
23
- login(os.getenv('HF_Token'))
24
- model = InferenceClientModel()
25
 
26
  with open("prompts.yaml", 'r') as stream:
27
  prompts = yaml.safe_load(stream)
 
4
  import inspect
5
  import pandas as pd
6
 
7
+ from smolagents import CodeAgent,DuckDuckGoSearchTool, InferenceClientModel, PromptTemplates, EMPTY_PROMPT_TEMPLATES
8
  from tools.final_answer import FinalAnswerTool
9
  import yaml
10
 
 
20
 
21
  # 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:
22
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
23
+ model = InferenceClientModel(token=os.getenv('HF_Token'))
 
24
 
25
  with open("prompts.yaml", 'r') as stream:
26
  prompts = yaml.safe_load(stream)