Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,17 +8,19 @@ from tools.final_answer import FinalAnswerTool
|
|
| 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 convert_currency(
|
| 13 |
-
|
| 14 |
-
|
| 15 |
Args:
|
| 16 |
-
amount: The amount to convert.
|
| 17 |
-
from_currency: The 3-letter currency code to convert from (e.g., 'USD').
|
| 18 |
-
to_currency: The 3-letter currency code to convert to (e.g., 'EUR').
|
| 19 |
|
| 20 |
Returns:
|
| 21 |
-
A string with the converted amount and exchange rate.
|
| 22 |
"""
|
| 23 |
try:
|
| 24 |
# Fetch exchange rate data
|
|
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
+
|
| 12 |
+
|
| 13 |
@tool
|
| 14 |
+
def convert_currency(amount: float, from_currency: str, to_currency: str) -> str:
|
| 15 |
+
"""Converts an amount from one currency to another using real-time exchange rates.
|
| 16 |
+
|
| 17 |
Args:
|
| 18 |
+
amount (float): The amount to convert.
|
| 19 |
+
from_currency (str): The 3-letter currency code to convert from (e.g., 'USD').
|
| 20 |
+
to_currency (str): The 3-letter currency code to convert to (e.g., 'EUR').
|
| 21 |
|
| 22 |
Returns:
|
| 23 |
+
str: A formatted string with the converted amount and exchange rate.
|
| 24 |
"""
|
| 25 |
try:
|
| 26 |
# Fetch exchange rate data
|