Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,9 @@ from Gradio_UI import GradioUI
|
|
9 |
|
10 |
import requests
|
11 |
import os
|
12 |
-
|
13 |
|
14 |
-
|
15 |
|
16 |
from typing import Dict, Any
|
17 |
|
@@ -28,7 +28,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
28 |
return "What magic will you build ?"
|
29 |
|
30 |
@tool
|
31 |
-
def
|
32 |
"""A tool that fetches the current weather data of a specified location.
|
33 |
Args:
|
34 |
location: A string representing a valid location name (e.g., 'Leicester/United Kingdom').
|
|
|
9 |
|
10 |
import requests
|
11 |
import os
|
12 |
+
from dotenv import load_dotenv
|
13 |
|
14 |
+
load_dotenv()
|
15 |
|
16 |
from typing import Dict, Any
|
17 |
|
|
|
28 |
return "What magic will you build ?"
|
29 |
|
30 |
@tool
|
31 |
+
def get_current_weather(location: str) -> Dict[str, Any]:
|
32 |
"""A tool that fetches the current weather data of a specified location.
|
33 |
Args:
|
34 |
location: A string representing a valid location name (e.g., 'Leicester/United Kingdom').
|