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