Spaces:
Build error
Build error
Update app.py
Browse files113 unmodified lines1141151161171171181191201211221231241251261271281291301311191321331341351361241371381391401411421431442 unmodified lines147148149133134135150151152153154155113 unmodified lines
# Gradio interfacewith gr.Blocks() as interface: # Instruction before file input # Welcome message and general instructions gr.Markdown("## Welcome to the YOLO Image Processing App!") gr.Markdown(""" This app allows you to upload multiple images, process them using a custom YOLO model, and download the processed images along with their YOLO-format annotations. ### How to Use: 1. **Upload**: Upload multiple images for processing. 2. **View**: Navigate through the processed images using the 'Previous' and 'Next' buttons. 3. **Download**: Download all processed images and annotations as a ZIP file. Follow the instructions below to get started! """)
# Step 1: Upload Instructions gr.Markdown("### Step 1: Upload Your Images") gr.Markdown("Upload multiple image files that you want to process using the model.") gr.Markdown("Upload multiple image files that you want to process using the model. The supported file types are JPEG and PNG.")
# Multiple file input and display area file_input = gr.Files(label="Upload multiple image files", type="filepath") image_display = gr.Image(label="Processed Image") label_display = gr.Textbox(label="Label File Content") label_display = gr.Textbox(label="YOLO Annotation for the Processed Image")
# Step 2: Navigation Instructions gr.Markdown("### Step 2: View Your Processed Images") gr.Markdown("After processing, use the 'Previous Image' and 'Next Image' buttons to navigate through the processed images and view their annotations.")
# Buttons for carousel navigation prev_button = gr.Button("Previous Image")2 unmodified lines # Hidden state to store current index current_index = gr.State(0)
# Instruction before download gr.Markdown("### Step 2: Download Processed Images and Annotations") gr.Markdown("After processing, you can download all processed images and annotations as a ZIP file.") # Step 3: Download Instructions gr.Markdown("### Step 3: Download All Processed Images and Annotations") gr.Markdown("Click the 'Prepare and Download All' button to download a ZIP file containing all processed images and YOLO annotations.")
# Button to download all processed images and annotations as a ZIP file download_button = gr.Button("Prepare and Download All")app.py+23-6