Mustafa Al Hamad commited on
Commit ·
18bd3c3
1
Parent(s): e1d2b81
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
|
| 2 |
import gradio as gr
|
| 3 |
-
|
| 4 |
def welcome(name):
|
| 5 |
return f"Welcome to Gradio, {name}!"
|
| 6 |
|
|
@@ -12,7 +12,7 @@ with gr.Blocks() as demo:
|
|
| 12 |
""")
|
| 13 |
inp = gr.Audio(source="")
|
| 14 |
out = None
|
| 15 |
-
examples = gr.Examples(examples=[[("announcer_begins_60sec (1).mp3")],[("announcer_begins_60sec (2).mp3")]],inputs=inp)
|
| 16 |
inp.change(welcome, inp, out)
|
| 17 |
|
| 18 |
if __name__ == "__main__":
|
|
|
|
| 1 |
|
| 2 |
import gradio as gr
|
| 3 |
+
import os
|
| 4 |
def welcome(name):
|
| 5 |
return f"Welcome to Gradio, {name}!"
|
| 6 |
|
|
|
|
| 12 |
""")
|
| 13 |
inp = gr.Audio(source="")
|
| 14 |
out = None
|
| 15 |
+
examples = gr.Examples(examples=[[os.path.join(os.path.dirname(__file__),("announcer_begins_60sec (1).mp3")],[examples=[[os.path.join(os.path.dirname(__file__),("announcer_begins_60sec (2).mp3")]],inputs=inp)
|
| 16 |
inp.change(welcome, inp, out)
|
| 17 |
|
| 18 |
if __name__ == "__main__":
|