Liphos commited on
Commit
aa285df
·
verified ·
1 Parent(s): fba2ea8

test audio

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +6 -1
Gradio_UI.py CHANGED
@@ -24,6 +24,11 @@ from smolagents.agents import ActionStep, MultiStepAgent
24
  from smolagents.memory import MemoryStep
25
  from smolagents.utils import _is_package_available
26
 
 
 
 
 
 
27
 
28
  def pull_messages_from_step(
29
  step_log: MemoryStep,
@@ -286,7 +291,7 @@ class GradioUI:
286
  [upload_status, file_uploads_log],
287
  )
288
  text_input = gr.Textbox(lines=1, label="Chat Message")
289
- test_audio = gr.Audio("https://cdnt-preview.dzcdn.net/api/1/1/f/1/b/0/f1becf66c6264a6a0306fc47d47690b0.mp3?hdnea=exp=1739829235~acl=/api/1/1/f/1/b/0/f1becf66c6264a6a0306fc47d47690b0.mp3*~data=user_id=0,application_id=42~hmac=3ef24bdedcde03bd48d3b52b56814d55629a8a992db08ec57e780c1392709b29", autoplay=True)
290
  text_input.submit(
291
  self.log_user_message,
292
  [text_input, file_uploads_log],
 
24
  from smolagents.memory import MemoryStep
25
  from smolagents.utils import _is_package_available
26
 
27
+ global audio_url_deezer = "https://cdnt-preview.dzcdn.net/api/1/1/f/1/b/0/f1becf66c6264a6a0306fc47d47690b0.mp3?hdnea=exp=1739830332~acl=/api/1/1/f/1/b/0/f1becf66c6264a6a0306fc47d47690b0.mp3*~data=user_id=0,application_id=42~hmac=9e471dba34ec2b3bdaede3d4991c03abac28d81f605b843f9d453ef7a88a19e5"
28
+
29
+ def play_audio():
30
+ return audio_url_deezer
31
+
32
 
33
  def pull_messages_from_step(
34
  step_log: MemoryStep,
 
291
  [upload_status, file_uploads_log],
292
  )
293
  text_input = gr.Textbox(lines=1, label="Chat Message")
294
+ test_audio = gr.Audio(play_audio, autoplay=True, loop=True, every=2)
295
  text_input.submit(
296
  self.log_user_message,
297
  [text_input, file_uploads_log],