miojizzy commited on
Commit
ca3894b
·
1 Parent(s): 2ccc721

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -21
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
- with gr.Row():
44
- with gr.Column():
45
- input_video = gr.Video()
46
- with gr.Accordion('Video Info'):
47
- output_fps = gr.Textbox(lines=1, label="fps")
48
- output_fms = gr.Textbox(lines=1, label="frame count")
49
- output_w = gr.Textbox(lines=1, label="width")
50
- output_h = gr.Textbox(lines=1, label="height")
51
- with gr.Column():
52
- output_img = gr.Image()
53
- with gr.Accordion('Show Frame'):
54
- input_n = gr.Slider(0, 9999, value=0, step=1, label="n")
55
- btn = gr.Button(value="Submit")
56
- input_video.change(
57
- video_change,
58
- inputs=[input_video],
59
- outputs=[output_fps, output_fms, output_w, output_h, input_n]
60
- )
61
- btn.click(get_nth_frame, inputs=[input_video, input_n], outputs=output_img)
 
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
- video_change,
82
  inputs=[input_video, state_vc],
83
  outputs=[output_fps, output_fms, output_w, output_h, input_n, state_vc]
84
  )
85
- btn.click(get_nth_frame, inputs=[state_vc, input_n], outputs=output_img)
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