Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -191,14 +191,13 @@ with gr.Blocks() as app:
|
|
191 |
frame_count=gr.Textbox(label="Frame Count",interactive = False)
|
192 |
fps=gr.Textbox(label="FPS",interactive = False)
|
193 |
outp_file=gr.Files()
|
194 |
-
with gr.Tab("Trim"):
|
195 |
with gr.Row():
|
196 |
start_f = gr.Textbox(label = "Start", value = "0:00:00", placeholder = "0:00:23")
|
197 |
end_f = gr.Textbox(label = "End", value = "0:00:05", placeholder = "0:00:54")
|
198 |
trim_btn=gr.Button("Trim")
|
199 |
with gr.Row():
|
200 |
-
in_trim = gr.Video()
|
201 |
out_trim=gr.Video()
|
|
|
202 |
with gr.Tab("Frames"):
|
203 |
frame_btn = gr.Button("Get Frames")
|
204 |
with gr.Row():
|
@@ -223,13 +222,11 @@ with gr.Blocks() as app:
|
|
223 |
|
224 |
def echo_fn(inp):
|
225 |
return inp
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
rem_btn.click(rem_bg,[outp_vid],[rem_vid,frame_num])
|
233 |
-
go_btn.click(dl,inp_url,[outp_vid,in_vid,outp_file,in_trim])
|
234 |
app.load(fn=predict, inputs=[text_input,url_params], outputs=[text_output,text_input],_js=load_js)
|
235 |
app.launch()
|
|
|
191 |
frame_count=gr.Textbox(label="Frame Count",interactive = False)
|
192 |
fps=gr.Textbox(label="FPS",interactive = False)
|
193 |
outp_file=gr.Files()
|
|
|
194 |
with gr.Row():
|
195 |
start_f = gr.Textbox(label = "Start", value = "0:00:00", placeholder = "0:00:23")
|
196 |
end_f = gr.Textbox(label = "End", value = "0:00:05", placeholder = "0:00:54")
|
197 |
trim_btn=gr.Button("Trim")
|
198 |
with gr.Row():
|
|
|
199 |
out_trim=gr.Video()
|
200 |
+
|
201 |
with gr.Tab("Frames"):
|
202 |
frame_btn = gr.Button("Get Frames")
|
203 |
with gr.Row():
|
|
|
222 |
|
223 |
def echo_fn(inp):
|
224 |
return inp
|
225 |
+
#outp_vid.change(echo_fn,outp_vid,[out_trim])
|
226 |
+
trim_btn.click(trim_vid,[outp_vid,start_f,end_f],out_trim)
|
227 |
+
outp_vid.change(load_video,outp_vid,[frame_count,fps]).then(echo_fn,outp_vid,[out_trim])
|
228 |
+
frame_btn.click(capture_function,[out_trim],[frame_gal,frame_file])
|
229 |
+
rem_btn.click(rem_bg,[outp_trim],[rem_vid,frame_num])
|
230 |
+
go_btn.click(dl,inp_url,[outp_vid,in_vid,outp_file,out_trim])
|
|
|
|
|
231 |
app.load(fn=predict, inputs=[text_input,url_params], outputs=[text_output,text_input],_js=load_js)
|
232 |
app.launch()
|