Spaces:
Sleeping
Sleeping
Commit
·
d504b2c
1
Parent(s):
9f39c86
more
Browse files- .gitignore +30 -0
- app.py +5 -3
- prompts.yaml +1 -1
- requirements.txt +4 -0
- tools/final_answer.py +1 -0
.gitignore
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
__pycache__
|
| 3 |
+
venv
|
| 4 |
+
env
|
| 5 |
+
.env
|
| 6 |
+
.venv
|
| 7 |
+
.pytest_cache
|
| 8 |
+
.coverage
|
| 9 |
+
.idea
|
| 10 |
+
.vscode
|
| 11 |
+
lightning_logs
|
| 12 |
+
.ipynb_checkpoints
|
| 13 |
+
.ckpt
|
| 14 |
+
example.ckpt
|
| 15 |
+
.neptune
|
| 16 |
+
logs_for_plots
|
| 17 |
+
logs_for_heuristics
|
| 18 |
+
logs_for_graphs
|
| 19 |
+
logs_for_freedom_maps
|
| 20 |
+
logs_for_experiments
|
| 21 |
+
heuristic_tables
|
| 22 |
+
stats
|
| 23 |
+
videos
|
| 24 |
+
algs_RL/stasts
|
| 25 |
+
.DS_Store
|
| 26 |
+
saved_replays
|
| 27 |
+
my_folder
|
| 28 |
+
results
|
| 29 |
+
test-trainer
|
| 30 |
+
.gradio
|
app.py
CHANGED
|
@@ -4,9 +4,11 @@ import requests
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
-
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
|
|
|
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
@@ -55,14 +57,14 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 55 |
|
| 56 |
agent = CodeAgent(
|
| 57 |
model=model,
|
| 58 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 59 |
max_steps=6,
|
| 60 |
verbosity_level=1,
|
| 61 |
grammar=None,
|
| 62 |
planning_interval=None,
|
| 63 |
name=None,
|
| 64 |
description=None,
|
| 65 |
-
prompt_templates=prompt_templates
|
| 66 |
)
|
| 67 |
|
| 68 |
|
|
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
+
from dotenv import load_dotenv
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
+
load_dotenv()
|
| 11 |
+
|
| 12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 13 |
@tool
|
| 14 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
|
|
| 57 |
|
| 58 |
agent = CodeAgent(
|
| 59 |
model=model,
|
| 60 |
+
tools=[final_answer, image_generation_tool, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 61 |
max_steps=6,
|
| 62 |
verbosity_level=1,
|
| 63 |
grammar=None,
|
| 64 |
planning_interval=None,
|
| 65 |
name=None,
|
| 66 |
description=None,
|
| 67 |
+
# prompt_templates=prompt_templates
|
| 68 |
)
|
| 69 |
|
| 70 |
|
prompts.yaml
CHANGED
|
@@ -318,4 +318,4 @@
|
|
| 318 |
And even if your task resolution is not successful, please return as much context as possible, so that your manager can act upon this feedback.
|
| 319 |
"report": |-
|
| 320 |
Here is the final answer from your managed agent '{{name}}':
|
| 321 |
-
{{final_answer}}
|
|
|
|
| 318 |
And even if your task resolution is not successful, please return as much context as possible, so that your manager can act upon this feedback.
|
| 319 |
"report": |-
|
| 320 |
Here is the final answer from your managed agent '{{name}}':
|
| 321 |
+
{{final_answer}}
|
requirements.txt
CHANGED
|
@@ -3,3 +3,7 @@ smolagents
|
|
| 3 |
requests
|
| 4 |
duckduckgo_search
|
| 5 |
pandas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
requests
|
| 4 |
duckduckgo_search
|
| 5 |
pandas
|
| 6 |
+
|
| 7 |
+
pytz
|
| 8 |
+
PyYAML
|
| 9 |
+
python-dotenv
|
tools/final_answer.py
CHANGED
|
@@ -11,4 +11,5 @@ class FinalAnswerTool(Tool):
|
|
| 11 |
return answer
|
| 12 |
|
| 13 |
def __init__(self, *args, **kwargs):
|
|
|
|
| 14 |
self.is_initialized = False
|
|
|
|
| 11 |
return answer
|
| 12 |
|
| 13 |
def __init__(self, *args, **kwargs):
|
| 14 |
+
super().__init__(*args, **kwargs)
|
| 15 |
self.is_initialized = False
|