Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -437,7 +437,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 437 |
with gr.Tab("Auto"):
|
| 438 |
with gr.Column():
|
| 439 |
project_name_2 = gr.Textbox(label="Name your project", info="no spaces nor special characters", value="my-new-project")
|
| 440 |
-
video_in = gr.Video(label="Source video",
|
| 441 |
subject_to_remove = gr.Textbox(label="Subject to remove")
|
| 442 |
|
| 443 |
submit_auto_btn = gr.Button("Submit")
|
|
@@ -472,20 +472,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 472 |
res_masked = gr.Video(label="Masked video", elem_id="res-masked")
|
| 473 |
res_files = gr.Video(label="Final result", elem_id="res_cleaned")
|
| 474 |
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
with gr.Group(elem_id="share-btn-container", visible=False) as share_group:
|
| 478 |
-
community_icon = gr.HTML(community_icon_html)
|
| 479 |
-
loading_icon = gr.HTML(loading_icon_html)
|
| 480 |
-
share_button = gr.Button("Share with Community", elem_id="share-btn")
|
| 481 |
-
|
| 482 |
-
gr.Markdown("""
|
| 483 |
-
[](https://huggingface.co/spaces/fffiloni/ProPainter?duplicate=true)
|
| 484 |
-
""")
|
| 485 |
|
| 486 |
|
| 487 |
submit_btn.click(fn=infer, inputs=[video_frames, masks_frames, project_name], outputs=[res_masked, res_files, share_group])
|
| 488 |
submit_auto_btn.click(fn=infer_auto, inputs=[project_name_2, video_in, subject_to_remove], outputs=[res_masked, res_files, share_group])
|
| 489 |
-
|
| 490 |
|
| 491 |
demo.queue(max_size=12).launch()
|
|
|
|
| 437 |
with gr.Tab("Auto"):
|
| 438 |
with gr.Column():
|
| 439 |
project_name_2 = gr.Textbox(label="Name your project", info="no spaces nor special characters", value="my-new-project")
|
| 440 |
+
video_in = gr.Video(label="Source video", sources="upload", format="mp4")
|
| 441 |
subject_to_remove = gr.Textbox(label="Subject to remove")
|
| 442 |
|
| 443 |
submit_auto_btn = gr.Button("Submit")
|
|
|
|
| 472 |
res_masked = gr.Video(label="Masked video", elem_id="res-masked")
|
| 473 |
res_files = gr.Video(label="Final result", elem_id="res_cleaned")
|
| 474 |
|
| 475 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
|
| 477 |
|
| 478 |
submit_btn.click(fn=infer, inputs=[video_frames, masks_frames, project_name], outputs=[res_masked, res_files, share_group])
|
| 479 |
submit_auto_btn.click(fn=infer_auto, inputs=[project_name_2, video_in, subject_to_remove], outputs=[res_masked, res_files, share_group])
|
| 480 |
+
% share_button.click(None, [], [], _js=share_js)
|
| 481 |
|
| 482 |
demo.queue(max_size=12).launch()
|