Spaces:
Runtime error
Runtime error
simonduerr
commited on
Commit
•
8031bf7
1
Parent(s):
dcbe2ed
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
|
|
|
|
|
|
|
4 |
with gr.Blocks() as demo:
|
5 |
f = gr.File(file_count="multiple")
|
6 |
j = gr.JSON()
|
7 |
-
|
|
|
8 |
|
9 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
|
4 |
+
def process(files):
|
5 |
+
return [os.path.basename(fo.name) for fo in files]
|
6 |
+
|
7 |
with gr.Blocks() as demo:
|
8 |
f = gr.File(file_count="multiple")
|
9 |
j = gr.JSON()
|
10 |
+
btn = gr.Button(value="Upload")
|
11 |
+
btn.click(fn=process, f, j)
|
12 |
|
13 |
demo.launch()
|