lchumaceiro commited on
Commit
eb54186
·
verified ·
1 Parent(s): a73def9
Files changed (1) hide show
  1. app.py +4 -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 properly formatted docstring
23
  @tool
24
  def generate_sound(sound_type: str, duration: int) -> str:
25
  """
26
- Generates a simple sound file and returns its file path.
27
-
28
  Args:
29
  sound_type (str): The type of sound to generate (e.g., 'rain', 'white_noise').
30
- duration (int): The duration of the generated sound in seconds.
31
 
32
  Returns:
33
  str: The file path of the generated sound file.
 
19
  else:
20
  print("⚠️ Hugging Face API token is missing! Set HF_TOKEN in Space secrets.")
21
 
22
+ # ✅ Sound generation tool with type hints and docstring descriptions
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
  Args:
29
  sound_type (str): The type of sound to generate (e.g., 'rain', 'white_noise').
30
+ duration (int): The duration of the sound in seconds.
31
 
32
  Returns:
33
  str: The file path of the generated sound file.