""" File download components """ import gradio as gr def create_file_download_section(): """Create file download section with individual file options""" with gr.Column(elem_classes="download-section"): gr.Markdown("### Generated Files") with gr.Row(): # app.py download with gr.Column(scale=1): app_download = gr.File( label="app.py", file_types=[".py"], interactive=False, elem_classes="file-download" ) gr.HTML('''
description Main application file
''') # requirements.txt download with gr.Column(scale=1): requirements_download = gr.File( label="requirements.txt", file_types=[".txt"], interactive=False, elem_classes="file-download" ) gr.HTML('''
list Dependencies list
''') # README.md download with gr.Column(scale=1): readme_download = gr.File( label="README.md", file_types=[".md"], interactive=False, elem_classes="file-download" ) gr.HTML('''
article Documentation
''') # Full package download gr.Markdown("### Complete Package") with gr.Row(): with gr.Column(): full_package_download = gr.File( label="Full Application Package", file_types=[".zip"], interactive=False, elem_classes="full-download" ) gr.HTML('''
folder_zip Contains all files for deployment
''') return { "app_download": app_download, "requirements_download": requirements_download, "readme_download": readme_download, "full_package_download": full_package_download }