arxivgpt kim commited on
Commit
4c60df7
ยท
verified ยท
1 Parent(s): 47fbf60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -78,18 +78,21 @@ def combine_videos(background_video, overlay_video, position, scale):
78
 
79
  return output_video_path
80
 
 
 
81
  iface = gr.Interface(
82
  fn=combine_videos,
83
  inputs=[
84
- gr.File(type="file", label="Background Video"),
85
- gr.File(type="file", label="Overlay Video"),
86
- gr.Dropdown(["center", "top", "bottom", "left", "right", "top left", "top right", "bottom left", "bottom right"], label="Position"),
87
- gr.Slider(minimum=1, maximum=10, value=5, label="Scale"),
88
  ],
89
- outputs="video",
90
- title="Combine Videos with Transparent Background",
91
- description="Upload a background video and a green-screen video. The green screen will be made transparent and overlaid onto the background video."
92
  )
93
 
 
94
  if __name__ == "__main__":
95
- iface.launch()
 
78
 
79
  return output_video_path
80
 
81
+
82
+ # Gradio ์ธํ„ฐํŽ˜์ด์Šค ์„ค์ •
83
  iface = gr.Interface(
84
  fn=combine_videos,
85
  inputs=[
86
+ gr.File(label="Background Video", type="binary"), # ํŒŒ์ผ์„ ๋ฐ”์ด๋„ˆ๋ฆฌ ํ˜•ํƒœ๋กœ ์ฒ˜๋ฆฌ
87
+ gr.File(label="Overlay Video", type="binary"), # ํŒŒ์ผ์„ ๋ฐ”์ด๋„ˆ๋ฆฌ ํ˜•ํƒœ๋กœ ์ฒ˜๋ฆฌ
88
+ gr.Dropdown(["์ƒ๋‹จ ์ขŒ์ธก", "์ƒ๋‹จ ์ค‘๊ฐ„", "์ƒ๋‹จ ์šฐ์ธก", "์ค‘๋‹จ ์ขŒ์ธก", "์ค‘๋‹จ ์ค‘๊ฐ„", "์ค‘๋‹จ ์šฐ์ธก", "ํ•˜๋‹จ ์ขŒ์ธก", "ํ•˜๋‹จ ์ค‘๊ฐ„", "ํ•˜๋‹จ ์šฐ์ธก"], label="Position"),
89
+ gr.Slider(minimum=1, maximum=10, value=5, label="Scale (BAR)"),
90
  ],
91
+ outputs=gr.Video(label="Combined Video"),
92
+ title="Combine Background Removed Video with Another Video",
93
+ description="Upload a background removed video and another video to combine them. Select the position and scale for the background removed video."
94
  )
95
 
96
+ # Gradio ์•ฑ ์‹คํ–‰
97
  if __name__ == "__main__":
98
+ iface.launch()