Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -75,6 +75,7 @@ def analyze_video(video_path, max_speakers, progress=gr.Progress()):
|
|
75 |
# Return output_components and transcription separately
|
76 |
return output_components + [transcription]
|
77 |
|
|
|
78 |
# Define the Gradio interface
|
79 |
with gr.Blocks() as iface:
|
80 |
gr.Markdown("# AI Personality Detection")
|
@@ -85,8 +86,6 @@ with gr.Blocks() as iface:
|
|
85 |
|
86 |
analyze_button = gr.Button("Analyze")
|
87 |
|
88 |
-
gr.Textbox(label="Execution Information", value="Waiting for analysis...", lines=2)
|
89 |
-
|
90 |
# Create placeholders for output components
|
91 |
output_components = []
|
92 |
for _ in range(3): # Assuming maximum of 3 speakers
|
@@ -102,13 +101,17 @@ with gr.Blocks() as iface:
|
|
102 |
])
|
103 |
|
104 |
# Add execution info box
|
105 |
-
|
|
|
|
|
|
|
|
|
106 |
output_components.append(transcript_output)
|
107 |
|
108 |
analyze_button.click(
|
109 |
fn=analyze_video,
|
110 |
inputs=[video_input, max_speakers],
|
111 |
-
outputs=output_components
|
112 |
show_progress=True
|
113 |
)
|
114 |
|
|
|
75 |
# Return output_components and transcription separately
|
76 |
return output_components + [transcription]
|
77 |
|
78 |
+
# Define the Gradio interface
|
79 |
# Define the Gradio interface
|
80 |
with gr.Blocks() as iface:
|
81 |
gr.Markdown("# AI Personality Detection")
|
|
|
86 |
|
87 |
analyze_button = gr.Button("Analyze")
|
88 |
|
|
|
|
|
89 |
# Create placeholders for output components
|
90 |
output_components = []
|
91 |
for _ in range(3): # Assuming maximum of 3 speakers
|
|
|
101 |
])
|
102 |
|
103 |
# Add execution info box
|
104 |
+
execution_info_box = gr.Textbox(label="Execution Information", value="Waiting for analysis...", lines=2)
|
105 |
+
output_components.append(execution_info_box)
|
106 |
+
|
107 |
+
# Add transcript output
|
108 |
+
transcript_output = gr.Textbox(label="Transcript", lines=10, visible=True)
|
109 |
output_components.append(transcript_output)
|
110 |
|
111 |
analyze_button.click(
|
112 |
fn=analyze_video,
|
113 |
inputs=[video_input, max_speakers],
|
114 |
+
outputs=output_components,
|
115 |
show_progress=True
|
116 |
)
|
117 |
|