Future-Tense commited on
Commit
fe0193c
·
1 Parent(s): b1307f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -63,7 +63,7 @@ def pl_fn(cap,cur,last,fps,pl_tog):
63
  #player = cv2.VideoCapture(cap)
64
  #assert player.isOpened() # Make sure that their is a stream.
65
  player.set(cv2.CAP_PROP_POS_FRAMES, cur)
66
- ret, frame_bgr = player.read(int(cur))
67
  frame = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2RGB)
68
  if pl_tog ==1:
69
  cur+=1
@@ -94,7 +94,7 @@ with gr.Blocks() as app:
94
  det_win = gr.Image(source="webcam", streaming=True)
95
  with gr.Row():
96
  pl_tog=gr.Number()
97
- pl.click(pl_fn,[output_win,cur_frame,total_frames,fps_frames,pl_tog],det_win,show_progress=False)
98
  bk.click(bk_fn,[cur_frame],cur_frame)
99
  fw.click(fw_fn,[cur_frame,total_frames],cur_frame)
100
  load_button.click(load,youtube_url,[output_win,cur_frame,total_frames,fps_frames])
 
63
  #player = cv2.VideoCapture(cap)
64
  #assert player.isOpened() # Make sure that their is a stream.
65
  player.set(cv2.CAP_PROP_POS_FRAMES, cur)
66
+ ret, frame_bgr = player.read(cur)
67
  frame = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2RGB)
68
  if pl_tog ==1:
69
  cur+=1
 
94
  det_win = gr.Image(source="webcam", streaming=True)
95
  with gr.Row():
96
  pl_tog=gr.Number()
97
+ pl.click(pl_fn,[output_win,cur_frame,total_frames,fps_frames,pl_tog],[det_win,cur_frames],show_progress=False)
98
  bk.click(bk_fn,[cur_frame],cur_frame)
99
  fw.click(fw_fn,[cur_frame,total_frames],cur_frame)
100
  load_button.click(load,youtube_url,[output_win,cur_frame,total_frames,fps_frames])