Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,13 +17,19 @@ from Gradio_UI import GradioUI
|
|
17 |
# arg2: the second argument
|
18 |
# """
|
19 |
# return "What magic will you build ?"
|
|
|
|
|
20 |
@tool
|
21 |
-
def my_custom_tool(arg1: str, arg2: int) -> str:
|
22 |
-
"""
|
23 |
-
|
|
|
24 |
Args:
|
25 |
-
arg1: A
|
26 |
-
arg2:
|
|
|
|
|
|
|
27 |
"""
|
28 |
try:
|
29 |
query = arg1.lower()
|
@@ -44,7 +50,7 @@ def my_custom_tool(arg1: str, arg2: int) -> str: # it's important to specify th
|
|
44 |
except Exception as e:
|
45 |
return f"Error fetching datasets for '{arg1}': {str(e)}"
|
46 |
|
47 |
-
|
48 |
@tool
|
49 |
def get_current_time_in_timezone(timezone: str) -> str:
|
50 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
17 |
# arg2: the second argument
|
18 |
# """
|
19 |
# return "What magic will you build ?"
|
20 |
+
|
21 |
+
|
22 |
@tool
|
23 |
+
def my_custom_tool(arg1: str, arg2: int) -> str:
|
24 |
+
"""
|
25 |
+
Fetch datasets related to a medical keyword such as body parts (e.g., skin, brain) or imaging modalities (e.g., MRI, CT).
|
26 |
+
|
27 |
Args:
|
28 |
+
arg1: A medical keyword such as 'skin', 'brain', 'XRay', or 'ultrasound'.
|
29 |
+
arg2: The maximum number of datasets to return.
|
30 |
+
|
31 |
+
Returns:
|
32 |
+
A formatted list of dataset names matching the keyword from Hugging Face.
|
33 |
"""
|
34 |
try:
|
35 |
query = arg1.lower()
|
|
|
50 |
except Exception as e:
|
51 |
return f"Error fetching datasets for '{arg1}': {str(e)}"
|
52 |
|
53 |
+
|
54 |
@tool
|
55 |
def get_current_time_in_timezone(timezone: str) -> str:
|
56 |
"""A tool that fetches the current local time in a specified timezone.
|