dowload_file / app.py
wasmdashai's picture
Update app.py
39a68cd verified
raw
history blame
473 Bytes
import gradio as gr
def download_file(file_path):
filename=f"wasmdashai/dowload_file/ccc.txt"
with open(filename, 'w') as f:
f.write("This is a sample file created by Gradio.")
return filename
interface = gr.Interface(
fn=download_file,
inputs=gr.File(label="Select file to download"),
outputs=gr.File(label="Download file"),
title="Download File",
description="Select a file from your computer to download."
)
interface.launch(share=True)