Spaces:
Sleeping
Sleeping
title added, state management updated, button color changed
Browse files
app.py
CHANGED
|
@@ -235,16 +235,17 @@ def getStartEndPoints(mask):
|
|
| 235 |
return x1, y1, x2, y2
|
| 236 |
|
| 237 |
def reset_components():
|
| 238 |
-
return None,None,None, [],[],24,datetime.now().strftime("%d_%m_%Y_%H_%M_%S")
|
| 239 |
|
|
|
|
| 240 |
|
| 241 |
with gr.Blocks() as demo:
|
|
|
|
| 242 |
gr.Markdown(
|
| 243 |
"""
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
Click on Run to start the process.
|
| 248 |
""")
|
| 249 |
original_frame_list = gr.State([])
|
| 250 |
mask_list = gr.State([])
|
|
@@ -254,19 +255,19 @@ with gr.Blocks() as demo:
|
|
| 254 |
with gr.Row():
|
| 255 |
with gr.Column(scale=2):
|
| 256 |
with gr.Row():
|
| 257 |
-
in_video = gr.PlayableVideo()
|
| 258 |
with gr.Row():
|
| 259 |
first_frame = gr.ImageMask()
|
| 260 |
with gr.Row():
|
| 261 |
-
approve_mask = gr.Button(value="Run")
|
| 262 |
with gr.Column(scale=1):
|
| 263 |
with gr.Row():
|
| 264 |
original_image = gr.Image(interactive=False)
|
| 265 |
with gr.Row():
|
| 266 |
masked_image = gr.Image(interactive=False)
|
| 267 |
with gr.Column(scale=2):
|
| 268 |
-
out_video = gr.Video()
|
| 269 |
-
out_video_inpaint = gr.Video()
|
| 270 |
# track_mask = gr.Button(value="Track and Mask")
|
| 271 |
# inpaint = gr.Button(value="Inpaint")
|
| 272 |
|
|
|
|
| 235 |
return x1, y1, x2, y2
|
| 236 |
|
| 237 |
def reset_components():
|
| 238 |
+
return gr.update(value=None),gr.update(value=None, interactive=False),gr.update(value=None, interactive=False), [],[],24,datetime.now().strftime("%d_%m_%Y_%H_%M_%S")
|
| 239 |
|
| 240 |
+
title = """<h1 align="center">Video Object Remover</h1>"""
|
| 241 |
|
| 242 |
with gr.Blocks() as demo:
|
| 243 |
+
gr.Markdown(title)
|
| 244 |
gr.Markdown(
|
| 245 |
"""
|
| 246 |
+
- Start uploading the video you wanted to edit.
|
| 247 |
+
- Select the object you want to remove from the video.
|
| 248 |
+
- Click on Run to start the process.
|
|
|
|
| 249 |
""")
|
| 250 |
original_frame_list = gr.State([])
|
| 251 |
mask_list = gr.State([])
|
|
|
|
| 255 |
with gr.Row():
|
| 256 |
with gr.Column(scale=2):
|
| 257 |
with gr.Row():
|
| 258 |
+
in_video = gr.PlayableVideo(label="Input Video")
|
| 259 |
with gr.Row():
|
| 260 |
first_frame = gr.ImageMask()
|
| 261 |
with gr.Row():
|
| 262 |
+
approve_mask = gr.Button(value="Run",variant="primary")
|
| 263 |
with gr.Column(scale=1):
|
| 264 |
with gr.Row():
|
| 265 |
original_image = gr.Image(interactive=False)
|
| 266 |
with gr.Row():
|
| 267 |
masked_image = gr.Image(interactive=False)
|
| 268 |
with gr.Column(scale=2):
|
| 269 |
+
out_video = gr.Video(label="Segmented Video")
|
| 270 |
+
out_video_inpaint = gr.Video(label="Inpainted Video")
|
| 271 |
# track_mask = gr.Button(value="Track and Mask")
|
| 272 |
# inpaint = gr.Button(value="Inpaint")
|
| 273 |
|