Gradio Agents & MCP Hackathon · Virtual, June 2-8 · $10k+ in prizes
Register NowGradio Agents & MCP Hackathon · Virtual, June 2-8 · $10k+ in prizes
Register NowNew to Gradio? Start here: Getting Started
See the Release History
To install Gradio from main, run the following command:
pip install https://gradio-builds.s3.amazonaws.com/23b789d7e5dbf62c19c1d49d3584489716de0788/gradio-5.32.1-py3-none-any.whl
*Note: Setting share=True
in
launch()
will not work.
gradio.DownloadData(···)
.download()
event. When gr.DownloadData is added as a type hint to an argument of an event listener method, a gr.DownloadData object will automatically be passed as the value of that argument. The attributes of this object contains information about the event that triggered the listener.import gradio as gr
def on_download(download_data: gr.DownloadData):
return f"Downloaded file: {download_data.file.path}"
with gr.Blocks() as demo:
files = gr.File()
textbox = gr.Textbox()
files.download(on_download, None, textbox)
demo.launch()