Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,7 +93,8 @@ def process_video(video_file, progress=gr.Progress()):
|
|
| 93 |
result = calls_table.select(calls_table.transcription_text, calls_table.insights, calls_table.audio).tail(1)
|
| 94 |
transcription = result['transcription_text'][0]
|
| 95 |
insights = result['insights'][0]
|
| 96 |
-
|
|
|
|
| 97 |
|
| 98 |
progress(1.0, desc="Processing complete")
|
| 99 |
|
|
@@ -219,7 +220,7 @@ with gr.Blocks(theme=gr.themes.Base()) as demo:
|
|
| 219 |
output_insights = gr.Textbox(label="Key Takeaways", lines=20)
|
| 220 |
|
| 221 |
with gr.TabItem("π΅ Audio"):
|
| 222 |
-
|
| 223 |
|
| 224 |
with gr.TabItem("π Search"):
|
| 225 |
with gr.Row():
|
|
@@ -253,7 +254,7 @@ with gr.Blocks(theme=gr.themes.Base()) as demo:
|
|
| 253 |
process_btn.click(
|
| 254 |
process_video,
|
| 255 |
inputs=[video_file],
|
| 256 |
-
outputs=[output_transcription, output_insights,
|
| 257 |
show_progress="full"
|
| 258 |
)
|
| 259 |
|
|
@@ -268,4 +269,4 @@ with gr.Blocks(theme=gr.themes.Base()) as demo:
|
|
| 268 |
clear.click(lambda: None, None, chatbot, queue=False)
|
| 269 |
|
| 270 |
if __name__ == "__main__":
|
| 271 |
-
demo.launch(show_api=False)
|
|
|
|
| 93 |
result = calls_table.select(calls_table.transcription_text, calls_table.insights, calls_table.audio).tail(1)
|
| 94 |
transcription = result['transcription_text'][0]
|
| 95 |
insights = result['insights'][0]
|
| 96 |
+
|
| 97 |
+
audio = calls_table.select(calls_table.audio).tail(1)['audio'][0]
|
| 98 |
|
| 99 |
progress(1.0, desc="Processing complete")
|
| 100 |
|
|
|
|
| 220 |
output_insights = gr.Textbox(label="Key Takeaways", lines=20)
|
| 221 |
|
| 222 |
with gr.TabItem("π΅ Audio"):
|
| 223 |
+
audio = gr.Audio(label="Extracted audio", type="filepath", show_download_button=True)
|
| 224 |
|
| 225 |
with gr.TabItem("π Search"):
|
| 226 |
with gr.Row():
|
|
|
|
| 254 |
process_btn.click(
|
| 255 |
process_video,
|
| 256 |
inputs=[video_file],
|
| 257 |
+
outputs=[output_transcription, output_insights, audio, status_output],
|
| 258 |
show_progress="full"
|
| 259 |
)
|
| 260 |
|
|
|
|
| 269 |
clear.click(lambda: None, None, chatbot, queue=False)
|
| 270 |
|
| 271 |
if __name__ == "__main__":
|
| 272 |
+
demo.launch(show_api=False, allowed_paths=[os.path.expanduser("~/.pixeltable/media")])
|