Spaces:
Runtime error
Runtime error
metehan yalçın
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,17 +9,6 @@ from Gradio_UI import GradioUI
|
|
| 9 |
import requests
|
| 10 |
from typing import Union
|
| 11 |
|
| 12 |
-
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 13 |
-
#@tool
|
| 14 |
-
#def my_custom_tool(currency_name:str, currency_value:int, target_currency:str)-> int: #it's import to specify the return type
|
| 15 |
-
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 16 |
-
"""A tool that does nothing yet
|
| 17 |
-
Args:
|
| 18 |
-
arg1: the first argument
|
| 19 |
-
arg2: the second argument
|
| 20 |
-
"""
|
| 21 |
-
#return "What magic will you build ?"
|
| 22 |
-
|
| 23 |
@tool
|
| 24 |
def my_custom_tool(currency_name: str, currency_value: float, target_currency: str) -> float:
|
| 25 |
"""A tool that converts an amount from one currency to another using current exchange rates.
|
|
@@ -102,7 +91,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 102 |
|
| 103 |
agent = CodeAgent(
|
| 104 |
model=model,
|
| 105 |
-
tools=[final_answer,
|
| 106 |
max_steps=6,
|
| 107 |
verbosity_level=1,
|
| 108 |
grammar=None,
|
|
|
|
| 9 |
import requests
|
| 10 |
from typing import Union
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
@tool
|
| 13 |
def my_custom_tool(currency_name: str, currency_value: float, target_currency: str) -> float:
|
| 14 |
"""A tool that converts an amount from one currency to another using current exchange rates.
|
|
|
|
| 91 |
|
| 92 |
agent = CodeAgent(
|
| 93 |
model=model,
|
| 94 |
+
tools=[final_answer,get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 95 |
max_steps=6,
|
| 96 |
verbosity_level=1,
|
| 97 |
grammar=None,
|