Update app.py
Browse files
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 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|