Omnibus commited on
Commit
3dbe3d9
·
1 Parent(s): 8b2805a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -58,7 +58,7 @@ def capture_function(vid=None,frame_count=None):
58
  frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
59
  fbox.append(frame_ff)
60
  capture.release()
61
- return fbox
62
 
63
 
64
  def rem_bg(inp):
@@ -117,7 +117,8 @@ with gr.Blocks() as app:
117
  outp_file=gr.Files()
118
  with gr.Tab("Frames"):
119
  frame_btn = gr.Button("Get Frames")
120
- frame_gal = gr.Gallery()
 
121
 
122
  with gr.Tab("Rem BG"):
123
  with gr.Row():
@@ -132,7 +133,7 @@ with gr.Blocks() as app:
132
  text_output=gr.Textbox()
133
  url_params=gr.JSON()
134
  outp_vid.change(load_video,outp_vid,frame_count)
135
- frame_btn.click(capture_function,[outp_vid,frame_count],frame_gal)
136
  rem_btn.click(rem_cv,in_vid,rem_vid)
137
  go_btn.click(dl,inp_url,[outp_vid,in_vid,outp_file])
138
  app.load(fn=predict, inputs=[text_input,url_params], outputs=[text_output,text_input],_js=load_js)
 
58
  frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
59
  fbox.append(frame_ff)
60
  capture.release()
61
+ return fbox,fbox
62
 
63
 
64
  def rem_bg(inp):
 
117
  outp_file=gr.Files()
118
  with gr.Tab("Frames"):
119
  frame_btn = gr.Button("Get Frames")
120
+ frame_gal = gr.Gallery(columns=6)
121
+ frame_file = gr.Files
122
 
123
  with gr.Tab("Rem BG"):
124
  with gr.Row():
 
133
  text_output=gr.Textbox()
134
  url_params=gr.JSON()
135
  outp_vid.change(load_video,outp_vid,frame_count)
136
+ frame_btn.click(capture_function,[outp_vid,frame_count],[frame_gal,frame_files])
137
  rem_btn.click(rem_cv,in_vid,rem_vid)
138
  go_btn.click(dl,inp_url,[outp_vid,in_vid,outp_file])
139
  app.load(fn=predict, inputs=[text_input,url_params], outputs=[text_output,text_input],_js=load_js)