Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,32 +33,7 @@ def clear_dynamic_info():
|
|
| 33 |
)
|
| 34 |
|
| 35 |
with gr.Blocks(css="app.css") as demo:
|
| 36 |
-
with gr.Tab("
|
| 37 |
-
gr.Markdown(value=DESCRIPTION_DYNAMIC)
|
| 38 |
-
with gr.Row():
|
| 39 |
-
with gr.Column(scale=2):
|
| 40 |
-
input_video = gr.Video(elem_classes="video1")
|
| 41 |
-
with gr.Row():
|
| 42 |
-
clear_btn_dynamic = gr.Button(
|
| 43 |
-
value="Clear", interactive=True, scale=1
|
| 44 |
-
)
|
| 45 |
-
submit_dynamic = gr.Button(
|
| 46 |
-
value="Submit", interactive=True, scale=1, elem_classes="submit"
|
| 47 |
-
)
|
| 48 |
-
with gr.Column(scale=2, elem_classes="dl4"):
|
| 49 |
-
with gr.Row():
|
| 50 |
-
output_video = gr.Video(label="Original video", scale=1, elem_classes="video2")
|
| 51 |
-
output_face = gr.Video(label="Pre-processed video", scale=1, elem_classes="video3")
|
| 52 |
-
output_heatmaps = gr.Video(label="Heatmaps", scale=1, elem_classes="video4")
|
| 53 |
-
output_statistics = gr.Plot(label="Statistics of emotions", elem_classes="stat")
|
| 54 |
-
gr.Examples(
|
| 55 |
-
["videos/video1.mp4",
|
| 56 |
-
"videos/video2.mp4",
|
| 57 |
-
],
|
| 58 |
-
[input_video],
|
| 59 |
-
)
|
| 60 |
-
|
| 61 |
-
with gr.Tab("Static App"):
|
| 62 |
gr.Markdown(value=DESCRIPTION_STATIC)
|
| 63 |
with gr.Row():
|
| 64 |
with gr.Column(scale=2, elem_classes="dl1"):
|
|
@@ -87,7 +62,34 @@ with gr.Blocks(css="app.css") as demo:
|
|
| 87 |
],
|
| 88 |
[input_image],
|
| 89 |
)
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
gr.Markdown(value=AUTHORS)
|
| 92 |
|
| 93 |
submit.click(
|
|
|
|
| 33 |
)
|
| 34 |
|
| 35 |
with gr.Blocks(css="app.css") as demo:
|
| 36 |
+
with gr.Tab("Static Faces"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
gr.Markdown(value=DESCRIPTION_STATIC)
|
| 38 |
with gr.Row():
|
| 39 |
with gr.Column(scale=2, elem_classes="dl1"):
|
|
|
|
| 62 |
],
|
| 63 |
[input_image],
|
| 64 |
)
|
| 65 |
+
|
| 66 |
+
with gr.Tab("Dynamic Faces"):
|
| 67 |
+
gr.Markdown(value=DESCRIPTION_DYNAMIC)
|
| 68 |
+
with gr.Row():
|
| 69 |
+
with gr.Column(scale=2):
|
| 70 |
+
input_video = gr.Video(elem_classes="video1")
|
| 71 |
+
with gr.Row():
|
| 72 |
+
clear_btn_dynamic = gr.Button(
|
| 73 |
+
value="Clear", interactive=True, scale=1
|
| 74 |
+
)
|
| 75 |
+
submit_dynamic = gr.Button(
|
| 76 |
+
value="Submit", interactive=True, scale=1, elem_classes="submit"
|
| 77 |
+
)
|
| 78 |
+
with gr.Column(scale=2, elem_classes="dl4"):
|
| 79 |
+
with gr.Row():
|
| 80 |
+
output_video = gr.Video(label="Original video", scale=1, elem_classes="video2")
|
| 81 |
+
output_face = gr.Video(label="Pre-processed video", scale=1, elem_classes="video3")
|
| 82 |
+
output_heatmaps = gr.Video(label="Heatmaps", scale=1, elem_classes="video4")
|
| 83 |
+
output_statistics = gr.Plot(label="Statistics of emotions", elem_classes="stat")
|
| 84 |
+
gr.Examples(
|
| 85 |
+
["videos/video1.mp4",
|
| 86 |
+
"videos/video2.mp4",
|
| 87 |
+
],
|
| 88 |
+
[input_video],
|
| 89 |
+
)
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
with gr.Tab("References"):
|
| 93 |
gr.Markdown(value=AUTHORS)
|
| 94 |
|
| 95 |
submit.click(
|