Spaces:
Sleeping
Sleeping
last fix attempt
Browse files
app.py
CHANGED
@@ -19,15 +19,15 @@ if hf_token:
|
|
19 |
else:
|
20 |
print("⚠️ Hugging Face API token is missing! Set HF_TOKEN in Space secrets.")
|
21 |
|
22 |
-
# ✅ Sound generation tool with
|
23 |
@tool
|
24 |
def generate_sound(sound_type: str, duration: int) -> str:
|
25 |
"""
|
26 |
Generates a simple sound based on the specified type and duration.
|
27 |
|
28 |
-
|
29 |
-
sound_type (str): The type of sound to generate
|
30 |
-
duration (int): The duration of the sound in seconds
|
31 |
|
32 |
Returns:
|
33 |
str: Path to the generated sound file (e.g., '/home/user/app/rain_3s.wav').
|
@@ -49,6 +49,7 @@ def generate_sound(sound_type: str, duration: int) -> str:
|
|
49 |
|
50 |
|
51 |
|
|
|
52 |
# ✅ Time zone tool
|
53 |
@tool
|
54 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
19 |
else:
|
20 |
print("⚠️ Hugging Face API token is missing! Set HF_TOKEN in Space secrets.")
|
21 |
|
22 |
+
# ✅ Sound generation tool with structured docstring for smolagents
|
23 |
@tool
|
24 |
def generate_sound(sound_type: str, duration: int) -> str:
|
25 |
"""
|
26 |
Generates a simple sound based on the specified type and duration.
|
27 |
|
28 |
+
Parameters:
|
29 |
+
sound_type (str): The type of sound to generate. Valid values are 'rain', 'white_noise'.
|
30 |
+
duration (int): The duration of the sound in seconds (integer).
|
31 |
|
32 |
Returns:
|
33 |
str: Path to the generated sound file (e.g., '/home/user/app/rain_3s.wav').
|
|
|
49 |
|
50 |
|
51 |
|
52 |
+
|
53 |
# ✅ Time zone tool
|
54 |
@tool
|
55 |
def get_current_time_in_timezone(timezone: str) -> str:
|