Spaces:
Runtime error
Runtime error
File size: 1,194 Bytes
40e52db 88e4b1c a87a1d9 a0cad49 a87a1d9 88e4b1c 6d9b79c 88e4b1c 6d9b79c 88e4b1c 6d9b79c 88e4b1c 6d9b79c 88e4b1c b024c7c 40e52db 6477da7 abffe4b 06500c7 abffe4b 52ffb7e a87a1d9 52ffb7e 40e52db 52ffb7e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
import gradio as gr
import os
css = """
p {
font-size: 120%;
}
li {
font-size: 110 %;
}
.container {
height: initial;
}
video {
max-height: 400px;
}
.image-container {
width: 200px;
max-height: 300px;
margin: auto;
}
img {
width: auto;
height: auto;
}
"""
def generate_video(original_video, watermark):
return gr.Video(original_video, watermark=watermark)
# Use RGBA image mode to preserve transparency for png images.
with gr.Column():
gr.Image('', visible=False)
with gr.Column():
gr.Image(
show_label=False,
show_download_button=False,
elem_id='example',
container=False,
interactive=False)
with gr.Row():
with gr.Column():
gr.Markdown("**Inputs**: Video and watermark file")
with gr.Column():
gr.Markdown("**Output**: Watermarked video")
gr.Interface(
generate_video,
[gr.Video(), gr.Image(type='filepath', image_mode=None)],
gr.Video(),
)
if __name__ == "__main__":
demo.launch()
|