sparsh007 commited on
Commit
40ea2da
·
verified ·
1 Parent(s): 680e43f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -6
app.py CHANGED
@@ -114,14 +114,31 @@ def prev_image(index):
114
 
115
  # Gradio interface
116
  with gr.Blocks() as interface:
117
- # Instruction before file input
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  gr.Markdown("### Step 1: Upload Your Images")
119
- gr.Markdown("Upload multiple image files that you want to process using the model.")
120
 
121
  # Multiple file input and display area
122
  file_input = gr.Files(label="Upload multiple image files", type="filepath")
123
  image_display = gr.Image(label="Processed Image")
124
- label_display = gr.Textbox(label="Label File Content")
 
 
 
 
125
 
126
  # Buttons for carousel navigation
127
  prev_button = gr.Button("Previous Image")
@@ -130,9 +147,9 @@ with gr.Blocks() as interface:
130
  # Hidden state to store current index
131
  current_index = gr.State(0)
132
 
133
- # Instruction before download
134
- gr.Markdown("### Step 2: Download Processed Images and Annotations")
135
- gr.Markdown("After processing, you can download all processed images and annotations as a ZIP file.")
136
 
137
  # Button to download all processed images and annotations as a ZIP file
138
  download_button = gr.Button("Prepare and Download All")
 
114
 
115
  # Gradio interface
116
  with gr.Blocks() as interface:
117
+ # Welcome message and general instructions
118
+ gr.Markdown("## Welcome to the YOLO Image Processing App!")
119
+ gr.Markdown("""
120
+ 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.
121
+
122
+ ### How to Use:
123
+ 1. **Upload**: Upload multiple images for processing.
124
+ 2. **View**: Navigate through the processed images using the 'Previous' and 'Next' buttons.
125
+ 3. **Download**: Download all processed images and annotations as a ZIP file.
126
+
127
+ Follow the instructions below to get started!
128
+ """)
129
+
130
+ # Step 1: Upload Instructions
131
  gr.Markdown("### Step 1: Upload Your Images")
132
+ gr.Markdown("Upload multiple image files that you want to process using the model. The supported file types are JPEG and PNG.")
133
 
134
  # Multiple file input and display area
135
  file_input = gr.Files(label="Upload multiple image files", type="filepath")
136
  image_display = gr.Image(label="Processed Image")
137
+ label_display = gr.Textbox(label="YOLO Annotation for the Processed Image")
138
+
139
+ # Step 2: Navigation Instructions
140
+ gr.Markdown("### Step 2: View Your Processed Images")
141
+ gr.Markdown("After processing, use the 'Previous Image' and 'Next Image' buttons to navigate through the processed images and view their annotations.")
142
 
143
  # Buttons for carousel navigation
144
  prev_button = gr.Button("Previous Image")
 
147
  # Hidden state to store current index
148
  current_index = gr.State(0)
149
 
150
+ # Step 3: Download Instructions
151
+ gr.Markdown("### Step 3: Download All Processed Images and Annotations")
152
+ gr.Markdown("Click the 'Prepare and Download All' button to download a ZIP file containing all processed images and YOLO annotations.")
153
 
154
  # Button to download all processed images and annotations as a ZIP file
155
  download_button = gr.Button("Prepare and Download All")