Spaces:
Runtime error
Runtime error
File size: 447 Bytes
6804d36 c868f53 76a41f5 6804d36 c868f53 6804d36 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
def download_file(file_path):
filename=f"/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.Label("dd"),
title="Download File",
description="Select a file from your computer to download."
)
interface.launch(share=True)
|