Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,13 @@ b = os.path.join(os.path.dirname(__file__), "files/barkley_balloon.mp4")
|
|
6 |
w1 = os.path.join(os.path.dirname(__file__), "files/hf-logo-with-title.png")
|
7 |
w2 = os.path.join(os.path.dirname(__file__), "files/hf-logo.png")
|
8 |
|
|
|
9 |
def generate_video(original_video, watermark):
|
10 |
return gr.Video(original_video, watermark=watermark)
|
11 |
|
12 |
# Use RGBA image mode to preserve transparency for png images.
|
13 |
demo = gr.Interface(generate_video, [gr.Video(), gr.Image(type='filepath', image_mode='RGBA')], gr.Video(),
|
14 |
-
examples=[[a, w1], [b, w2]])
|
15 |
|
16 |
if __name__ == "__main__":
|
17 |
demo.launch()
|
|
|
6 |
w1 = os.path.join(os.path.dirname(__file__), "files/hf-logo-with-title.png")
|
7 |
w2 = os.path.join(os.path.dirname(__file__), "files/hf-logo.png")
|
8 |
|
9 |
+
|
10 |
def generate_video(original_video, watermark):
|
11 |
return gr.Video(original_video, watermark=watermark)
|
12 |
|
13 |
# Use RGBA image mode to preserve transparency for png images.
|
14 |
demo = gr.Interface(generate_video, [gr.Video(), gr.Image(type='filepath', image_mode='RGBA')], gr.Video(),
|
15 |
+
examples=[[a, w1], [b, w2]], title="Watermarking Example", description="Watermarks can be visible or invisible; they can provide information directly or provide a link for more information.")
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
demo.launch()
|