Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -119,29 +119,6 @@ with gr.Blocks() as iface:
|
|
| 119 |
video_input = gr.Video(label="Upload Video")
|
| 120 |
|
| 121 |
analyze_button = gr.Button("Analyze")
|
| 122 |
-
|
| 123 |
-
gr.Markdown("### Example Videos")
|
| 124 |
-
with gr.Row():
|
| 125 |
-
with gr.Column(scale=1):
|
| 126 |
-
example_video_1_path = "examples/Scenes.From.A.Marriage.US.mp4"
|
| 127 |
-
preview_1 = get_middle_frame(example_video_1_path)
|
| 128 |
-
gr.Image(preview_1, label="Scenes From A Marriage")
|
| 129 |
-
example_video_1 = gr.Video(example_video_1_path, label="Example 1", visible=False)
|
| 130 |
-
use_example_button_1 = gr.Button("Load Example 1")
|
| 131 |
-
|
| 132 |
-
with gr.Column(scale=1):
|
| 133 |
-
example_video_2_path = "examples/Billie Eilish.mp4"
|
| 134 |
-
preview_2 = get_middle_frame(example_video_2_path)
|
| 135 |
-
gr.Image(preview_2, label="Billie Eilish")
|
| 136 |
-
example_video_2 = gr.Video(example_video_2_path, label="Example 2", visible=False)
|
| 137 |
-
use_example_button_2 = gr.Button("Load Example 2")
|
| 138 |
-
|
| 139 |
-
with gr.Column(scale=1):
|
| 140 |
-
example_video_3_path = "examples/Elliot Rodger.mp4"
|
| 141 |
-
preview_3 = get_middle_frame(example_video_3_path)
|
| 142 |
-
gr.Image(preview_3, label="Elliot Rodger")
|
| 143 |
-
example_video_3 = gr.Video(example_video_3_path, label="Example 3", visible=False)
|
| 144 |
-
use_example_button_3 = gr.Button("Load Example 3")
|
| 145 |
|
| 146 |
# Create output components
|
| 147 |
output_components = []
|
|
@@ -187,7 +164,31 @@ with gr.Blocks() as iface:
|
|
| 187 |
gr.HTML("<div style='height: 20px;'></div>")
|
| 188 |
gr.Image(value="appendix/AI Personality Detection flow - 1.png", label='Flowchart 1', width=1000)
|
| 189 |
gr.Image(value="appendix/AI Personality Detection flow - 2.png", label='Flowchart 2', width=1000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
analyze_button.click(
|
| 192 |
fn=analyze_video,
|
| 193 |
inputs=[video_input],
|
|
|
|
| 119 |
video_input = gr.Video(label="Upload Video")
|
| 120 |
|
| 121 |
analyze_button = gr.Button("Analyze")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
# Create output components
|
| 124 |
output_components = []
|
|
|
|
| 164 |
gr.HTML("<div style='height: 20px;'></div>")
|
| 165 |
gr.Image(value="appendix/AI Personality Detection flow - 1.png", label='Flowchart 1', width=1000)
|
| 166 |
gr.Image(value="appendix/AI Personality Detection flow - 2.png", label='Flowchart 2', width=1000)
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
gr.Markdown("### Example Videos")
|
| 170 |
+
with gr.Row():
|
| 171 |
+
with gr.Column(scale=1):
|
| 172 |
+
example_video_1_path = "examples/Scenes.From.A.Marriage.US.mp4"
|
| 173 |
+
preview_1 = get_middle_frame(example_video_1_path)
|
| 174 |
+
gr.Image(preview_1, label="Scenes From A Marriage")
|
| 175 |
+
example_video_1 = gr.Video(example_video_1_path, label="Example 1", visible=False)
|
| 176 |
+
use_example_button_1 = gr.Button("Load Example 1")
|
| 177 |
|
| 178 |
+
with gr.Column(scale=1):
|
| 179 |
+
example_video_2_path = "examples/Billie Eilish.mp4"
|
| 180 |
+
preview_2 = get_middle_frame(example_video_2_path)
|
| 181 |
+
gr.Image(preview_2, label="Billie Eilish")
|
| 182 |
+
example_video_2 = gr.Video(example_video_2_path, label="Example 2", visible=False)
|
| 183 |
+
use_example_button_2 = gr.Button("Load Example 2")
|
| 184 |
+
|
| 185 |
+
with gr.Column(scale=1):
|
| 186 |
+
example_video_3_path = "examples/Elliot Rodger.mp4"
|
| 187 |
+
preview_3 = get_middle_frame(example_video_3_path)
|
| 188 |
+
gr.Image(preview_3, label="Elliot Rodger")
|
| 189 |
+
example_video_3 = gr.Video(example_video_3_path, label="Example 3", visible=False)
|
| 190 |
+
use_example_button_3 = gr.Button("Load Example 3")
|
| 191 |
+
|
| 192 |
analyze_button.click(
|
| 193 |
fn=analyze_video,
|
| 194 |
inputs=[video_input],
|