Spaces:
Sleeping
Sleeping
fixes
Browse files
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
|
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 |
-
#
|
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)
|