Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
-
from smolagents import
|
| 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 |
-
|
| 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)
|