Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -80,6 +80,9 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
80 |
while len(output_components) < 28:
|
81 |
output_components.extend([gr.update(visible=False)] * 9)
|
82 |
|
|
|
|
|
|
|
83 |
return output_components
|
84 |
|
85 |
|
@@ -88,17 +91,17 @@ def use_example():
|
|
88 |
|
89 |
|
90 |
with gr.Blocks() as iface:
|
91 |
-
gr.Markdown("#
|
|
|
92 |
|
93 |
with gr.Row():
|
94 |
with gr.Column(scale=3):
|
95 |
-
gr.Markdown("Upload a video")
|
96 |
video_input = gr.Video(label="Upload Video")
|
97 |
analyze_button = gr.Button("Analyze")
|
98 |
with gr.Column(scale=1):
|
99 |
gr.Markdown("Example Video")
|
100 |
example_video = gr.Video("examples/Scenes.From.A.Marriage.US.mp4", label="Example Video")
|
101 |
-
use_example_button = gr.Button("
|
102 |
|
103 |
# Create output components
|
104 |
output_components = []
|
@@ -137,6 +140,11 @@ with gr.Blocks() as iface:
|
|
137 |
output_components.extend(column_components3)
|
138 |
output_components.extend(column_components4)
|
139 |
|
|
|
|
|
|
|
|
|
|
|
140 |
analyze_button.click(
|
141 |
fn=analyze_video,
|
142 |
inputs=[video_input],
|
|
|
80 |
while len(output_components) < 28:
|
81 |
output_components.extend([gr.update(visible=False)] * 9)
|
82 |
|
83 |
+
with gr.Tab(label=f'Description', visible=False):
|
84 |
+
gr.Markdown(description_txt)
|
85 |
+
|
86 |
return output_components
|
87 |
|
88 |
|
|
|
91 |
|
92 |
|
93 |
with gr.Blocks() as iface:
|
94 |
+
gr.Markdown("# Multiple-Speakers-Personality-Analyzer")
|
95 |
+
gr.Markdown("This project provides an advanced AI system designed for diagnosing and profiling personality attributes from video content based on a single speaker or multiple speakers in a conversation.")
|
96 |
|
97 |
with gr.Row():
|
98 |
with gr.Column(scale=3):
|
|
|
99 |
video_input = gr.Video(label="Upload Video")
|
100 |
analyze_button = gr.Button("Analyze")
|
101 |
with gr.Column(scale=1):
|
102 |
gr.Markdown("Example Video")
|
103 |
example_video = gr.Video("examples/Scenes.From.A.Marriage.US.mp4", label="Example Video")
|
104 |
+
use_example_button = gr.Button("Load Example")
|
105 |
|
106 |
# Create output components
|
107 |
output_components = []
|
|
|
140 |
output_components.extend(column_components3)
|
141 |
output_components.extend(column_components4)
|
142 |
|
143 |
+
with open('description.txt', 'r') as file:
|
144 |
+
description_txt = file.read()
|
145 |
+
with gr.Tab(label=f'Description', visible=True):
|
146 |
+
gr.Markdown(description_txt)
|
147 |
+
|
148 |
analyze_button.click(
|
149 |
fn=analyze_video,
|
150 |
inputs=[video_input],
|