Mustafa Al Hamad commited on
Commit ·
92e4b14
1
Parent(s): a4bf748
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
import os
|
| 4 |
def welcome(name):
|
|
@@ -10,15 +9,16 @@ with gr.Blocks() as demo:
|
|
| 10 |
# Listen to a sample!
|
| 11 |
Select a sample at the bottom to listen to.
|
| 12 |
""")
|
| 13 |
-
inp = gr.Audio(source="")
|
|
|
|
| 14 |
out = None
|
| 15 |
-
examples = gr.Examples(examples=[
|
| 16 |
-
[
|
| 17 |
-
[
|
| 18 |
-
[
|
| 19 |
-
[
|
| 20 |
-
],inputs=inp)
|
| 21 |
-
inp.change(welcome, inp, out)
|
| 22 |
|
| 23 |
if __name__ == "__main__":
|
| 24 |
demo.launch()
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
def welcome(name):
|
|
|
|
| 9 |
# Listen to a sample!
|
| 10 |
Select a sample at the bottom to listen to.
|
| 11 |
""")
|
| 12 |
+
inp = gr.Audio(source="",label='Music')
|
| 13 |
+
inp1 = gr.Image(visible=False)
|
| 14 |
out = None
|
| 15 |
+
examples = gr.Examples(label='List of samples',examples=[
|
| 16 |
+
[("LastPoint2.mp3"),"SA.jpg"],
|
| 17 |
+
[("5MinutesLeft.mp3"),"SA.jpg"],
|
| 18 |
+
[("Overtime4.mp3"),"SA.jpg"],
|
| 19 |
+
[("AdditionalTimeEnemy.mp3"),"SA.jpg"]
|
| 20 |
+
],inputs=[inp,inp1])
|
| 21 |
+
inp.change(welcome, [inp,inp1], out)
|
| 22 |
|
| 23 |
if __name__ == "__main__":
|
| 24 |
demo.launch()
|