Spaces:
Sleeping
Sleeping
Commit
·
ebc9dfd
1
Parent(s):
605033f
Auto commit 2025-06-29 10:34:39
Browse files
app.py
CHANGED
|
@@ -14,11 +14,18 @@ from Gradio_UI import GradioUI
|
|
| 14 |
final_answer = FinalAnswerTool()
|
| 15 |
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# Import tool from Hub
|
| 19 |
|
| 20 |
-
with open("prompts.yaml", 'r') as stream:
|
| 21 |
-
prompt_templates = yaml.safe_load(stream)
|
| 22 |
|
| 23 |
|
| 24 |
|
|
@@ -53,7 +60,7 @@ agent = CodeAgent(
|
|
| 53 |
planning_interval=None,
|
| 54 |
name=None,
|
| 55 |
description=None,
|
| 56 |
-
prompt_templates=
|
| 57 |
)
|
| 58 |
|
| 59 |
|
|
|
|
| 14 |
final_answer = FinalAnswerTool()
|
| 15 |
|
| 16 |
|
| 17 |
+
system_promot = """
|
| 18 |
+
You are a helpful assistant tasked with answering questions using a set of tools.
|
| 19 |
+
Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
|
| 20 |
+
FINAL ANSWER: [YOUR FINAL ANSWER].
|
| 21 |
+
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
|
| 22 |
+
Your answer should only start with "FINAL ANSWER: ", then follows with the answer.
|
| 23 |
+
"""
|
| 24 |
|
| 25 |
# Import tool from Hub
|
| 26 |
|
| 27 |
+
#with open("prompts.yaml", 'r') as stream:
|
| 28 |
+
# prompt_templates = yaml.safe_load(stream)
|
| 29 |
|
| 30 |
|
| 31 |
|
|
|
|
| 60 |
planning_interval=None,
|
| 61 |
name=None,
|
| 62 |
description=None,
|
| 63 |
+
prompt_templates=system_promot
|
| 64 |
)
|
| 65 |
|
| 66 |
|