Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
41 |
speaker_explanations = explanations[speaker_id]
|
42 |
speaker_general_impression = general_impressions[speaker_id]
|
43 |
|
44 |
-
with gr.Tab(
|
45 |
with gr.TabItem(label=f'General Impression'):
|
46 |
speaker_section1 = [
|
47 |
gr.Markdown(f"### {speaker_id}", visible=True),
|
@@ -72,9 +72,9 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
72 |
output_components.extend(speaker_section3)
|
73 |
output_components.extend(speaker_section4)
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
return output_components
|
80 |
|
@@ -104,8 +104,8 @@ with gr.Blocks() as iface:
|
|
104 |
output_components.append(transcript)
|
105 |
|
106 |
|
107 |
-
for
|
108 |
-
with gr.Tab(label=f'Speaker {
|
109 |
with gr.TabItem(label=f'General Impression'):
|
110 |
column_components1 = [
|
111 |
gr.Markdown(visible=False),
|
|
|
41 |
speaker_explanations = explanations[speaker_id]
|
42 |
speaker_general_impression = general_impressions[speaker_id]
|
43 |
|
44 |
+
with gr.Tab():
|
45 |
with gr.TabItem(label=f'General Impression'):
|
46 |
speaker_section1 = [
|
47 |
gr.Markdown(f"### {speaker_id}", visible=True),
|
|
|
72 |
output_components.extend(speaker_section3)
|
73 |
output_components.extend(speaker_section4)
|
74 |
|
75 |
+
# Pad with None for any missing speakers
|
76 |
+
while len(output_components) < 28:
|
77 |
+
output_components.extend([gr.update(visible=False)] * 9)
|
78 |
|
79 |
return output_components
|
80 |
|
|
|
104 |
output_components.append(transcript)
|
105 |
|
106 |
|
107 |
+
for n in range(3): # Assuming maximum of 3 speakers
|
108 |
+
with gr.Tab(label=f'Speaker {n+1}', visible=True):
|
109 |
with gr.TabItem(label=f'General Impression'):
|
110 |
column_components1 = [
|
111 |
gr.Markdown(visible=False),
|