srivatsavdamaraju commited on
Commit
4ccef7f
Β·
verified Β·
1 Parent(s): 09bda2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -15
app.py CHANGED
@@ -179,28 +179,39 @@ with gr.Blocks(title="Fast Archery Pose Capture") as app:
179
  gr.Markdown("## 🏹 Archery Pose Dataset Tool (Optimized for Speed)")
180
  gr.Markdown("⚑ **Optimized**: Instant capture with background pose processing")
181
 
 
182
  video_input = gr.Video(label="🎞️ Upload Video")
183
  load_btn = gr.Button("πŸ“‚ Load Video", variant="primary")
184
  status = gr.Textbox(label="Status", interactive=False)
185
 
 
186
  with gr.Row():
187
- play_btn = gr.Button("▢️ Play", variant="secondary")
188
- pause_btn = gr.Button("⏸️ Pause", variant="secondary")
189
- show_btn = gr.Button("πŸ–ΌοΈ Show Current Frame", variant="secondary")
190
-
191
- image_output = gr.Image(label="Current Frame", height=400)
192
-
193
- with gr.Row():
194
- caption_input = gr.Textbox(label="Caption", placeholder="Describe the pose...")
195
- capture_btn = gr.Button("πŸ“Έ Capture & Pause", variant="primary", size="lg")
196
-
197
- with gr.Row():
198
- info_btn = gr.Button("πŸ“Š Dataset Info")
199
- download_btn = gr.Button("πŸ“₯ Download CSV")
200
- reset_btn = gr.Button("πŸ”„ Reset", variant="stop")
 
 
 
 
 
 
 
 
 
201
 
 
202
  csv_file = gr.File(label="πŸ“„ Dataset CSV")
203
- dataset_info = gr.Textbox(label="Dataset Info", interactive=False)
204
 
205
  # Bind actions
206
  load_btn.click(load_video, inputs=video_input, outputs=status)
 
179
  gr.Markdown("## 🏹 Archery Pose Dataset Tool (Optimized for Speed)")
180
  gr.Markdown("⚑ **Optimized**: Instant capture with background pose processing")
181
 
182
+ # Top section - Video loading
183
  video_input = gr.Video(label="🎞️ Upload Video")
184
  load_btn = gr.Button("πŸ“‚ Load Video", variant="primary")
185
  status = gr.Textbox(label="Status", interactive=False)
186
 
187
+ # Main section - Side by side layout
188
  with gr.Row():
189
+ # Left column - Video display and controls
190
+ with gr.Column(scale=1):
191
+ gr.Markdown("### πŸŽ₯ Video Player")
192
+ with gr.Row():
193
+ play_btn = gr.Button("▢️ Play", variant="secondary")
194
+ pause_btn = gr.Button("⏸️ Pause", variant="secondary")
195
+ show_btn = gr.Button("πŸ–ΌοΈ Show Frame", variant="secondary")
196
+
197
+ image_output = gr.Image(label="Current Frame", height=400)
198
+
199
+ # Right column - Capture controls
200
+ with gr.Column(scale=1):
201
+ gr.Markdown("### πŸ“Έ Capture Controls")
202
+ caption_input = gr.Textbox(label="Caption", placeholder="Describe the pose...", lines=2)
203
+ capture_btn = gr.Button("πŸ“Έ Capture & Pause", variant="primary", size="lg")
204
+
205
+ gr.Markdown("### πŸ“Š Dataset Management")
206
+ with gr.Row():
207
+ info_btn = gr.Button("πŸ“Š Dataset Info")
208
+ download_btn = gr.Button("πŸ“₯ Download CSV")
209
+
210
+ reset_btn = gr.Button("πŸ”„ Reset All", variant="stop")
211
+ dataset_info = gr.Textbox(label="Dataset Info", interactive=False, lines=2)
212
 
213
+ # Bottom section - File download
214
  csv_file = gr.File(label="πŸ“„ Dataset CSV")
 
215
 
216
  # Bind actions
217
  load_btn.click(load_video, inputs=video_input, outputs=status)