Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def pdf_to_audio(file_output):
|
|
30 |
pdf_summary = ""
|
31 |
pdf_reader = PdfReader(file_output)
|
32 |
for page in pdf_reader.pages:
|
33 |
-
page_summary = summarizer(page.extract_text(), min_length=10, max_length=
|
34 |
pdf_summary = pdf_summary + page_summary[0]["summary_text"] + " "
|
35 |
narrated_text = narrator(pdf_summary)
|
36 |
return gr.Audio((narrated_text["sampling_rate"], narrated_text["audio"].T))
|
|
|
30 |
pdf_summary = ""
|
31 |
pdf_reader = PdfReader(file_output)
|
32 |
for page in pdf_reader.pages:
|
33 |
+
page_summary = summarizer(page.extract_text(), min_length=10, max_length=100)
|
34 |
pdf_summary = pdf_summary + page_summary[0]["summary_text"] + " "
|
35 |
narrated_text = narrator(pdf_summary)
|
36 |
return gr.Audio((narrated_text["sampling_rate"], narrated_text["audio"].T))
|