Spaces:
Runtime error
Runtime error
File size: 296 Bytes
b305b8f 8031bf7 b305b8f 8031bf7 3cba10d b305b8f |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gradio as gr
import os
def process(files):
return [os.path.basename(fo.name) for fo in files]
with gr.Blocks() as demo:
f = gr.File(file_count="multiple")
j = gr.JSON()
btn = gr.Button(value="Upload")
btn.click(fn=process, inputs=[f], outputs=[j])
demo.launch() |