Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,25 +40,26 @@ def get_nth_frame2(vc, n):
|
|
| 40 |
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
with gr.Tab("Create Image Classify Dataset"):
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
| 62 |
|
| 63 |
gr.Markdown("*****")
|
| 64 |
|
|
@@ -78,11 +79,11 @@ with gr.Blocks() as demo:
|
|
| 78 |
btn = gr.Button(value="Submit")
|
| 79 |
|
| 80 |
input_video.change(
|
| 81 |
-
|
| 82 |
inputs=[input_video, state_vc],
|
| 83 |
outputs=[output_fps, output_fms, output_w, output_h, input_n, state_vc]
|
| 84 |
)
|
| 85 |
-
btn.click(
|
| 86 |
|
| 87 |
gr.Markdown("*****")
|
| 88 |
|
|
|
|
| 40 |
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
with gr.Tab("Create Image Classify Dataset"):
|
| 43 |
+
|
| 44 |
+
# with gr.Row():
|
| 45 |
+
# with gr.Column():
|
| 46 |
+
# input_video = gr.Video()
|
| 47 |
+
# with gr.Accordion('Video Info'):
|
| 48 |
+
# output_fps = gr.Textbox(lines=1, label="fps")
|
| 49 |
+
# output_fms = gr.Textbox(lines=1, label="frame count")
|
| 50 |
+
# output_w = gr.Textbox(lines=1, label="width")
|
| 51 |
+
# output_h = gr.Textbox(lines=1, label="height")
|
| 52 |
+
# with gr.Column():
|
| 53 |
+
# output_img = gr.Image()
|
| 54 |
+
# with gr.Accordion('Show Frame'):
|
| 55 |
+
# input_n = gr.Slider(0, 9999, value=0, step=1, label="n")
|
| 56 |
+
# btn = gr.Button(value="Submit")
|
| 57 |
+
# input_video.change(
|
| 58 |
+
# video_change,
|
| 59 |
+
# inputs=[input_video],
|
| 60 |
+
# outputs=[output_fps, output_fms, output_w, output_h, input_n]
|
| 61 |
+
# )
|
| 62 |
+
# btn.click(get_nth_frame, inputs=[input_video, input_n], outputs=output_img)
|
| 63 |
|
| 64 |
gr.Markdown("*****")
|
| 65 |
|
|
|
|
| 79 |
btn = gr.Button(value="Submit")
|
| 80 |
|
| 81 |
input_video.change(
|
| 82 |
+
video_change2,
|
| 83 |
inputs=[input_video, state_vc],
|
| 84 |
outputs=[output_fps, output_fms, output_w, output_h, input_n, state_vc]
|
| 85 |
)
|
| 86 |
+
btn.click(get_nth_frame2, inputs=[state_vc, input_n], outputs=output_img)
|
| 87 |
|
| 88 |
gr.Markdown("*****")
|
| 89 |
|