File size: 445 Bytes
e8f37c0 451bbc2 e8f37c0 70ed47a 451bbc2 028dcae c197c0b e8f37c0 451bbc2 e8f37c0 80e2ff3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
def play_audio():
return "my_way.mp3"
def unload_audio():
return None
with gr.Blocks() as demo:
gr.Markdown("# Hit Single Real - Silly Billy")
play_button = gr.Button("...")
unload_button = gr.Button("..")
audio_output = gr.Audio(autoplay=True, visible=False)
play_button.click(fn=play_audio, outputs=audio_output)
unload_button.click(fn=unload_audio, outputs=audio_output)
demo.launch()
|