Simon Stolarczyk commited on
Commit
c7cb9a5
1 Parent(s): 7cbc42d

Add file input interface.

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +8 -3
  2. app.py +8 -3
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -1,7 +1,12 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "! Let's make some music!"
 
 
 
 
 
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  iface.launch()
1
  import gradio as gr
2
 
3
+ def process_midi(filename):
4
+ return "Got it!"
5
+
6
+ iface = gr.Interface(
7
+ fn=process_midi,
8
+ inputs="file",
9
+ outputs="text"
10
+ )
11
 
 
12
  iface.launch()
app.py CHANGED
@@ -1,7 +1,12 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "! Let's make some music!"
 
 
 
 
 
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  iface.launch()
1
  import gradio as gr
2
 
3
+ def process_midi(filename):
4
+ return "Got it!"
5
+
6
+ iface = gr.Interface(
7
+ fn=process_midi,
8
+ inputs="file",
9
+ outputs="text"
10
+ )
11
 
 
12
  iface.launch()