Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,21 +43,18 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
43 |
| {speaker_id} |
|
44 |
|-----------|
|
45 |
"""
|
46 |
-
speaker_general_impression = general_impressions[speaker_id]
|
47 |
speaker_explanations = explanations[speaker_id]
|
|
|
48 |
speaker_section = [
|
49 |
gr.Markdown(markdown_content, visible=True),
|
50 |
gr.Textbox(value=speaker_general_impression, label="General Impression", lines=3, visible=True),
|
51 |
gr.Plot(value=speaker_charts.get("attachment", None), visible=True),
|
52 |
-
gr.Textbox(value=speaker_explanations.get("attachment", ""), label="Attachment Styles Explanation",
|
53 |
-
visible=True),
|
54 |
gr.Plot(value=speaker_charts.get("dimensions", None), visible=True),
|
55 |
gr.Plot(value=speaker_charts.get("bigfive", None), visible=True),
|
56 |
-
gr.Textbox(value=speaker_explanations.get("bigfive", ""), label="Big Five Traits Explanation",
|
57 |
-
visible=True),
|
58 |
gr.Plot(value=speaker_charts.get("personality", None), visible=True),
|
59 |
-
gr.Textbox(value=speaker_explanations.get("personality", ""), label="Personality Disorders Explanation",
|
60 |
-
visible=True),
|
61 |
]
|
62 |
output_components.extend(speaker_section)
|
63 |
|
@@ -93,16 +90,17 @@ with gr.Blocks() as iface:
|
|
93 |
for _ in range(3): # Assuming maximum of 3 speakers
|
94 |
output_components.extend([
|
95 |
gr.Markdown(visible=False),
|
96 |
-
gr.
|
97 |
gr.Plot(visible=False),
|
98 |
gr.Textbox(label="Attachment Styles Explanation", visible=False),
|
99 |
gr.Plot(visible=False),
|
|
|
100 |
gr.Textbox(label="Big Five Traits Explanation", visible=False),
|
101 |
gr.Plot(visible=False),
|
102 |
gr.Textbox(label="Personality Disorders Explanation", visible=False),
|
103 |
])
|
104 |
|
105 |
-
# Add
|
106 |
transcript_output = gr.Textbox(label="Transcript", lines=10, visible=False)
|
107 |
output_components.append(transcript_output)
|
108 |
|
|
|
43 |
| {speaker_id} |
|
44 |
|-----------|
|
45 |
"""
|
|
|
46 |
speaker_explanations = explanations[speaker_id]
|
47 |
+
speaker_general_impression = general_impressions[speaker_id]
|
48 |
speaker_section = [
|
49 |
gr.Markdown(markdown_content, visible=True),
|
50 |
gr.Textbox(value=speaker_general_impression, label="General Impression", lines=3, visible=True),
|
51 |
gr.Plot(value=speaker_charts.get("attachment", None), visible=True),
|
52 |
+
gr.Textbox(value=speaker_explanations.get("attachment", ""), label="Attachment Styles Explanation", visible=True),
|
|
|
53 |
gr.Plot(value=speaker_charts.get("dimensions", None), visible=True),
|
54 |
gr.Plot(value=speaker_charts.get("bigfive", None), visible=True),
|
55 |
+
gr.Textbox(value=speaker_explanations.get("bigfive", ""), label="Big Five Traits Explanation", visible=True),
|
|
|
56 |
gr.Plot(value=speaker_charts.get("personality", None), visible=True),
|
57 |
+
gr.Textbox(value=speaker_explanations.get("personality", ""), label="Personality Disorders Explanation", visible=True),
|
|
|
58 |
]
|
59 |
output_components.extend(speaker_section)
|
60 |
|
|
|
90 |
for _ in range(3): # Assuming maximum of 3 speakers
|
91 |
output_components.extend([
|
92 |
gr.Markdown(visible=False),
|
93 |
+
gr.Textbox(label="General Impression", visible=False),
|
94 |
gr.Plot(visible=False),
|
95 |
gr.Textbox(label="Attachment Styles Explanation", visible=False),
|
96 |
gr.Plot(visible=False),
|
97 |
+
gr.Plot(visible=False),
|
98 |
gr.Textbox(label="Big Five Traits Explanation", visible=False),
|
99 |
gr.Plot(visible=False),
|
100 |
gr.Textbox(label="Personality Disorders Explanation", visible=False),
|
101 |
])
|
102 |
|
103 |
+
# Add transcript output component
|
104 |
transcript_output = gr.Textbox(label="Transcript", lines=10, visible=False)
|
105 |
output_components.append(transcript_output)
|
106 |
|