Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,15 @@ import sys
|
|
5 |
import os
|
6 |
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
def process_video(video):
|
9 |
cap = cv2.VideoCapture(video)
|
10 |
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
@@ -24,7 +33,7 @@ def process_video(video):
|
|
24 |
title = "Welcome to DDM DeepSort"
|
25 |
description = "Upload a video to process it using DDM and DeepSORT."
|
26 |
|
27 |
-
with gr.Blocks() as demo:
|
28 |
|
29 |
gr.Interface(
|
30 |
fn=app_main,
|
@@ -50,7 +59,7 @@ with gr.Blocks() as demo:
|
|
50 |
|
51 |
with gr.Row():
|
52 |
with gr.Column():
|
53 |
-
gr.HTML("<div
|
54 |
gr.Video(value="DDMDeepsort1.mp4", label="Demo Video", width=720, height=435)
|
55 |
gr.HTML("</div>")
|
56 |
|
|
|
5 |
import os
|
6 |
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
7 |
|
8 |
+
|
9 |
+
css = """
|
10 |
+
.video-container {
|
11 |
+
display: flex;
|
12 |
+
justify-content: center;
|
13 |
+
align-items: center;
|
14 |
+
}
|
15 |
+
"""
|
16 |
+
|
17 |
def process_video(video):
|
18 |
cap = cv2.VideoCapture(video)
|
19 |
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
|
|
33 |
title = "Welcome to DDM DeepSort"
|
34 |
description = "Upload a video to process it using DDM and DeepSORT."
|
35 |
|
36 |
+
with gr.Blocks(css=css) as demo:
|
37 |
|
38 |
gr.Interface(
|
39 |
fn=app_main,
|
|
|
59 |
|
60 |
with gr.Row():
|
61 |
with gr.Column():
|
62 |
+
gr.HTML("<div class="video-container">")
|
63 |
gr.Video(value="DDMDeepsort1.mp4", label="Demo Video", width=720, height=435)
|
64 |
gr.HTML("</div>")
|
65 |
|