Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,15 @@ from helper_fns import process_files, get_summarization_method
|
|
3 |
from summarizer import summarize_file
|
4 |
from helper_fns import text_to_speech
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
with gr.Blocks() as demo:
|
7 |
with gr.Row():
|
8 |
with gr.Column():
|
@@ -37,7 +46,7 @@ with gr.Blocks() as demo:
|
|
37 |
autoplay=False)
|
38 |
|
39 |
generate_summaries_button.click(
|
40 |
-
fn =
|
41 |
inputs=[summarization_method_radio, files],
|
42 |
outputs=[summary_text, audio_file]
|
43 |
)
|
|
|
3 |
from summarizer import summarize_file
|
4 |
from helper_fns import text_to_speech
|
5 |
|
6 |
+
|
7 |
+
def generate_output(method, file):
|
8 |
+
|
9 |
+
summary_text = summarize_file(method, file)
|
10 |
+
audio_summary = text_to_speech(summary_text)
|
11 |
+
|
12 |
+
retur summary_text, audio_summary
|
13 |
+
|
14 |
+
|
15 |
with gr.Blocks() as demo:
|
16 |
with gr.Row():
|
17 |
with gr.Column():
|
|
|
46 |
autoplay=False)
|
47 |
|
48 |
generate_summaries_button.click(
|
49 |
+
fn = generate_output,
|
50 |
inputs=[summarization_method_radio, files],
|
51 |
outputs=[summary_text, audio_file]
|
52 |
)
|