Spaces:
Build error
Build error
Commit ยท
84a1b4f
1
Parent(s): 605da91
added file for video to download
Browse files- app.py +2 -1
- video_watermark_remover.py +1 -1
app.py
CHANGED
|
@@ -133,7 +133,8 @@ with demo:
|
|
| 133 |
with gr.Column():
|
| 134 |
pass
|
| 135 |
|
| 136 |
-
|
|
|
|
| 137 |
input_video.change(convert_video_to_frames, inputs=[input_video], outputs=[mask, remove_btn])
|
| 138 |
remove_btn.click(remove_watermark, inputs=[mask], outputs=[output_video, remove_btn])
|
| 139 |
|
|
|
|
| 133 |
with gr.Column():
|
| 134 |
pass
|
| 135 |
|
| 136 |
+
with gr.Row():
|
| 137 |
+
output_video = gr.File(label="Output Video", interactive=False)
|
| 138 |
input_video.change(convert_video_to_frames, inputs=[input_video], outputs=[mask, remove_btn])
|
| 139 |
remove_btn.click(remove_watermark, inputs=[mask], outputs=[output_video, remove_btn])
|
| 140 |
|
video_watermark_remover.py
CHANGED
|
@@ -78,7 +78,7 @@ def remove_watermark(sketch, images_path='frames', output_path='output_images'):
|
|
| 78 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
| 79 |
executor.map(lambda image_path: process_image(mask_data, image_path), image_paths)
|
| 80 |
|
| 81 |
-
return gr.
|
| 82 |
|
| 83 |
def convert_video_to_frames(video):
|
| 84 |
if os.path.exists('input_video.mp4'):
|
|
|
|
| 78 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
| 79 |
executor.map(lambda image_path: process_image(mask_data, image_path), image_paths)
|
| 80 |
|
| 81 |
+
return gr.File.update(value=convert_frames_to_video('output_images'), visible=True), gr.Button.update(value='Done!')
|
| 82 |
|
| 83 |
def convert_video_to_frames(video):
|
| 84 |
if os.path.exists('input_video.mp4'):
|