Ubik80 commited on
Commit
02dc956
·
verified ·
1 Parent(s): 9f4a3ee
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,7 +11,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
 
12
  class BasicAgent:
13
  def __init__(self):
14
- # Initialize CodeAgent with an OpenAI model and custom AnswerTool
15
  model = OpenAIServerModel(model_id="gpt-4o")
16
  answer_tool = AnswerTool()
17
  self.agent = CodeAgent(
@@ -23,7 +23,7 @@ class BasicAgent:
23
  )
24
 
25
  def __call__(self, question: str) -> str:
26
- # Execute a single step to call the AnswerTool
27
  return self.agent.run(question)
28
 
29
 
@@ -119,4 +119,4 @@ with gr.Blocks() as demo:
119
  test_btn.click(fn=test_random_question, inputs=[username_input], outputs=[question_out, answer_out])
120
 
121
  if __name__ == "__main__":
122
- demo.launch(debug=True, share=False)
 
11
 
12
  class BasicAgent:
13
  def __init__(self):
14
+ # Initialize CodeAgent with GPT-4o and only the custom AnswerTool
15
  model = OpenAIServerModel(model_id="gpt-4o")
16
  answer_tool = AnswerTool()
17
  self.agent = CodeAgent(
 
23
  )
24
 
25
  def __call__(self, question: str) -> str:
26
+ # Single-step invocation of AnswerTool
27
  return self.agent.run(question)
28
 
29
 
 
119
  test_btn.click(fn=test_random_question, inputs=[username_input], outputs=[question_out, answer_out])
120
 
121
  if __name__ == "__main__":
122
+ demo.launch(debug=True, share=False)