File size: 517 Bytes
efaae49
 
 
50ae3b1
 
 
 
efaae49
a2d5d0e
 
efaae49
 
a2d5d0e
 
efaae49
 
a2d5d0e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import os

a = "demos/video_component/files/a.mp4"  # Video
b = "demos/video_component/files/b.mp4"  # Video
w1 = "demos/video_component/files/w1.jpg"  # Watermark
w2 = "demos/video_component/files/w2.png"  # Watermark

def generate_video(original_video, watermark_file):
    return gr.Video(a, watermark_file=watermark_file)


demo = gr.Interface(generate_video, [gr.Textbox(), gr.File()], gr.Video(),
                    examples=[[a, w1], [b, w2]])

if __name__ == "__main__":
    demo.launch()