testSpace / app.py
Xaot6's picture
Update app.py
26c09c0 verified
raw
history blame
596 Bytes
import gradio as gr
def process_file(file):
if file is not None:
# You can add your file processing logic here
status = "Processing"
# Simulate some processing (optional, replace with actual processing)
import time
time.sleep(2) # Simulate processing time
status = "Finished"
return status, file
return "No file uploaded.", None
iface = gr.Interface(
fn=process_file,
inputs=gr.File(label="Upload your file"),
outputs=[gr.Textbox(label="Status"), gr.File(label="Download the file")],
live=False
)
iface.launch()