Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def analyze_video(video_path, progress=gr.Progress()):
|
|
31 |
end_time = time.time()
|
32 |
execution_time = end_time - start_time
|
33 |
|
34 |
-
output_components = [
|
35 |
|
36 |
for i, (speaker_id, speaker_charts) in enumerate(charts.items(), start=1):
|
37 |
print(speaker_id)
|
@@ -74,7 +74,10 @@ 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 |
-
|
|
|
|
|
|
|
78 |
return output_components
|
79 |
|
80 |
def update_output(*args):
|
@@ -100,8 +103,7 @@ with gr.Blocks() as iface:
|
|
100 |
output_components = []
|
101 |
|
102 |
# Add transcript output near the top
|
103 |
-
|
104 |
-
output_components.append(execution_info_box)
|
105 |
|
106 |
for i in range(3): # Assuming maximum of 3 speakers
|
107 |
with gr.Tab(label=f'Speaker {i+1}', visible=True):
|
|
|
31 |
end_time = time.time()
|
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 |
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
|
82 |
|
83 |
def update_output(*args):
|
|
|
103 |
output_components = []
|
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):
|