meg HF staff commited on
Commit
6477da7
·
verified ·
1 Parent(s): 3b918f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,8 +9,8 @@ w2 = os.path.join(os.path.dirname(__file__), "files/hf-logo.png")
9
  def generate_video(original_video, watermark):
10
  return gr.Video(original_video, watermark=watermark)
11
 
12
-
13
- demo = gr.Interface(generate_video, [gr.Video(), gr.Image(type='filepath')], gr.Video(),
14
  examples=[[a, w1], [b, w2]])
15
 
16
  if __name__ == "__main__":
 
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__":