lchumaceiro commited on
Commit
349fb7b
·
verified ·
1 Parent(s): 1560c31

last fix attempt

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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 explicitly formatted 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
- Arguments:
29
- sound_type (str): The type of sound to generate, valid options are 'rain', 'white_noise'.
30
- duration (int): The duration of the sound in seconds. Must be an integer value.
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: