Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,9 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
32 |
execution_time = end_time - start_time
|
33 |
|
34 |
output_components = [] # transcript
|
|
|
|
|
|
|
35 |
|
36 |
for i, (speaker_id, speaker_charts) in enumerate(charts.items(), start=1):
|
37 |
print(speaker_id)
|
@@ -74,8 +77,6 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
74 |
output_components.extend([gr.update(visible=False)] * 9)
|
75 |
|
76 |
output_components.append(f"Completed in {int(execution_time)} seconds.") # execution info
|
77 |
-
with gr.Tab(label='Transcript', visible=True):
|
78 |
-
transcript_output = gr.Textbox(label="Transcript", lines=10, visible=True)
|
79 |
|
80 |
|
81 |
return output_components
|
@@ -104,6 +105,9 @@ with gr.Blocks() as iface:
|
|
104 |
|
105 |
# Add transcript output near the top
|
106 |
gr.Textbox(label="Execution Info", value="N/A", lines=1)
|
|
|
|
|
|
|
107 |
|
108 |
for i in range(3): # Assuming maximum of 3 speakers
|
109 |
with gr.Tab(label=f'Speaker {i+1}', visible=True):
|
@@ -133,9 +137,6 @@ with gr.Blocks() as iface:
|
|
133 |
output_components.extend(column_components3)
|
134 |
output_components.extend(column_components4)
|
135 |
|
136 |
-
with gr.Tab(label='Transcript', visible=True):
|
137 |
-
transcript_output = gr.Textbox(label="Transcript", lines=10, visible=True)
|
138 |
-
|
139 |
analyze_button.click(
|
140 |
fn=analyze_video,
|
141 |
inputs=[video_input],
|
|
|
32 |
execution_time = end_time - start_time
|
33 |
|
34 |
output_components = [] # transcript
|
35 |
+
|
36 |
+
with gr.Tab(label='Transcript', visible=True):
|
37 |
+
transcript_output = gr.Textbox(label="Transcript", lines=10, visible=True)
|
38 |
|
39 |
for i, (speaker_id, speaker_charts) in enumerate(charts.items(), start=1):
|
40 |
print(speaker_id)
|
|
|
77 |
output_components.extend([gr.update(visible=False)] * 9)
|
78 |
|
79 |
output_components.append(f"Completed in {int(execution_time)} seconds.") # execution info
|
|
|
|
|
80 |
|
81 |
|
82 |
return output_components
|
|
|
105 |
|
106 |
# Add transcript output near the top
|
107 |
gr.Textbox(label="Execution Info", value="N/A", lines=1)
|
108 |
+
|
109 |
+
with gr.Tab(label='Transcript', visible=True):
|
110 |
+
transcript_output = gr.Textbox(label="Transcript", lines=10, visible=True)
|
111 |
|
112 |
for i in range(3): # Assuming maximum of 3 speakers
|
113 |
with gr.Tab(label=f'Speaker {i+1}', visible=True):
|
|
|
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],
|