Liphos commited on
Commit
3390430
·
verified ·
1 Parent(s): bdce920
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -57,7 +57,7 @@ def play_audio_from_url(url):
57
  pygame.time.Clock().tick(10)
58
 
59
  @tool
60
- def play_preview_deezer(track: str, artist:str) -> None:
61
  """Play a preview of a track from Deezer.
62
  Args:
63
  track: The track to play.
@@ -94,6 +94,7 @@ def play_preview_deezer(track: str, artist:str) -> None:
94
  # Play the track
95
  print("Playing preview: ", first_track['preview'])
96
  set_audio_url(first_track['preview'])
 
97
  else:
98
  raise ValueError("No tracks found.")
99
  else:
 
57
  pygame.time.Clock().tick(10)
58
 
59
  @tool
60
+ def play_preview_deezer(track: str, artist:str) -> str:
61
  """Play a preview of a track from Deezer.
62
  Args:
63
  track: The track to play.
 
94
  # Play the track
95
  print("Playing preview: ", first_track['preview'])
96
  set_audio_url(first_track['preview'])
97
+ return f'{first_track['title']} by {first_track['artist']['name']} is playing.'
98
  else:
99
  raise ValueError("No tracks found.")
100
  else: