asaporta commited on
Commit
0393c92
·
verified ·
1 Parent(s): a9ae310

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -10,10 +10,18 @@ from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
 
12
  # --- Basic Agent Definition ---
 
 
 
 
 
 
 
 
13
  class BasicAgent:
14
  def __init__(self):
15
  print("BasicAgent initialized.")
16
- self.agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel())
17
 
18
  SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question. Report your thoughts, and
19
  finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
 
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
 
12
  # --- Basic Agent Definition ---
13
+
14
+
15
+ model = HfApiModel(
16
+ max_tokens=2096,
17
+ temperature=0.5,
18
+ model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',# it is possible that this model may be overloaded
19
+ custom_role_conversions=None,
20
+ )
21
  class BasicAgent:
22
  def __init__(self):
23
  print("BasicAgent initialized.")
24
+ self.agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
25
 
26
  SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question. Report your thoughts, and
27
  finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].