import gradio as gr | |
def process_file(file): | |
if file is not None: | |
return file.name | |
return "No file uploaded." | |
iface = gr.Interface( | |
fn=process_file, | |
inputs=gr.inputs.File(label="Upload your file"), | |
outputs="text", | |
live=False | |
) | |
iface.launch() | |