Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
32 |
execution_time = end_time - start_time
|
33 |
|
34 |
output_components = [transcription] # transcript
|
35 |
-
|
36 |
for i, (speaker_id, speaker_charts) in enumerate(charts.items(), start=1):
|
37 |
print(speaker_id)
|
38 |
speaker_explanations = explanations[speaker_id]
|
@@ -43,26 +43,30 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
43 |
speaker_section1 = [
|
44 |
gr.Markdown(f"# {speaker_id}", visible=True),
|
45 |
gr.Textbox(value=speaker_general_impression, label="General Impression",
|
46 |
-
visible=True)
|
|
|
47 |
|
48 |
with gr.TabItem(label=f'Attachment Styles'):
|
49 |
-
with gr.Column(
|
50 |
speaker_section2_1 = [
|
51 |
gr.Plot(value=speaker_charts.get("attachment", None), visible=True),
|
52 |
-
gr.Plot(value=speaker_charts.get("dimensions", None), visible=True)
|
|
|
53 |
speaker_section2_2 = [
|
54 |
-
gr.Textbox(value=speaker_explanations.get("attachment", ""), label="Attachment Styles Explanation", visible=True)
|
55 |
-
|
|
|
56 |
with gr.TabItem(label=f'Big Five Traits'):
|
57 |
speaker_section3 = [
|
58 |
gr.Plot(value=speaker_charts.get("bigfive", None), visible=True),
|
59 |
-
gr.Textbox(value=speaker_explanations.get("bigfive", ""), label="Big Five Traits Explanation", visible=True)
|
60 |
-
|
|
|
61 |
with gr.TabItem(label=f'Personalities'):
|
62 |
speaker_section4 = [
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
|
67 |
output_components.extend(speaker_section1)
|
68 |
output_components.extend(speaker_section2_1)
|
|
|
32 |
execution_time = end_time - start_time
|
33 |
|
34 |
output_components = [transcription] # transcript
|
35 |
+
|
36 |
for i, (speaker_id, speaker_charts) in enumerate(charts.items(), start=1):
|
37 |
print(speaker_id)
|
38 |
speaker_explanations = explanations[speaker_id]
|
|
|
43 |
speaker_section1 = [
|
44 |
gr.Markdown(f"# {speaker_id}", visible=True),
|
45 |
gr.Textbox(value=speaker_general_impression, label="General Impression",
|
46 |
+
visible=True)
|
47 |
+
]
|
48 |
|
49 |
with gr.TabItem(label=f'Attachment Styles'):
|
50 |
+
with gr.Column():
|
51 |
speaker_section2_1 = [
|
52 |
gr.Plot(value=speaker_charts.get("attachment", None), visible=True),
|
53 |
+
gr.Plot(value=speaker_charts.get("dimensions", None), visible=True)
|
54 |
+
]
|
55 |
speaker_section2_2 = [
|
56 |
+
gr.Textbox(value=speaker_explanations.get("attachment", ""), label="Attachment Styles Explanation", visible=True)
|
57 |
+
]
|
58 |
+
|
59 |
with gr.TabItem(label=f'Big Five Traits'):
|
60 |
speaker_section3 = [
|
61 |
gr.Plot(value=speaker_charts.get("bigfive", None), visible=True),
|
62 |
+
gr.Textbox(value=speaker_explanations.get("bigfive", ""), label="Big Five Traits Explanation", visible=True)
|
63 |
+
]
|
64 |
+
|
65 |
with gr.TabItem(label=f'Personalities'):
|
66 |
speaker_section4 = [
|
67 |
+
gr.Plot(value=speaker_charts.get("personality", None), visible=True),
|
68 |
+
gr.Textbox(value=speaker_explanations.get("personality", ""), label="Personality Disorders Explanation", visible=True)
|
69 |
+
]
|
70 |
|
71 |
output_components.extend(speaker_section1)
|
72 |
output_components.extend(speaker_section2_1)
|