Update app.py
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ class BasicAgent:
|
|
| 54 |
tools=[self.web_search, self.visit_webpage, self.final_answer],
|
| 55 |
# tools=[self.web_search, self.visit_webpage, self.final_answer, go_back, close_popups, search_item_ctrl_f],
|
| 56 |
model=self.model,
|
| 57 |
-
additional_authorized_imports=["pandas", "openpyxl", "yt_dlp", "requests", "io", "json", "whisper"],
|
| 58 |
max_steps=10 # Limit reasoning steps
|
| 59 |
)
|
| 60 |
|
|
@@ -65,8 +65,8 @@ class BasicAgent:
|
|
| 65 |
|
| 66 |
try:
|
| 67 |
# Run the agent with the question
|
| 68 |
-
formatted_question = f"{question}\n\nOnly return the exact answer, no explanation."
|
| 69 |
-
|
| 70 |
answer = self.agent.run(formatted_question)
|
| 71 |
answer = str(answer).strip() if answer is not None else "No answer produced."
|
| 72 |
# answer = self.agent.run(question)
|
|
|
|
| 54 |
tools=[self.web_search, self.visit_webpage, self.final_answer],
|
| 55 |
# tools=[self.web_search, self.visit_webpage, self.final_answer, go_back, close_popups, search_item_ctrl_f],
|
| 56 |
model=self.model,
|
| 57 |
+
additional_authorized_imports=["pandas", "openpyxl", "yt_dlp", "requests", "io", "json", "whisper", "bs4"],
|
| 58 |
max_steps=10 # Limit reasoning steps
|
| 59 |
)
|
| 60 |
|
|
|
|
| 65 |
|
| 66 |
try:
|
| 67 |
# Run the agent with the question
|
| 68 |
+
# formatted_question = f"{question}\n\nOnly return the exact answer, no explanation."
|
| 69 |
+
formatted_question = f"{self.system_prompt}\n\nQuestion: {question}\n\n"
|
| 70 |
answer = self.agent.run(formatted_question)
|
| 71 |
answer = str(answer).strip() if answer is not None else "No answer produced."
|
| 72 |
# answer = self.agent.run(question)
|