Update app.py
Browse files
app.py
CHANGED
|
@@ -75,12 +75,6 @@ def generate_audio_func(pdf_file):
|
|
| 75 |
write_wav(wav_file_path, 22050, (audio_array * 32767).astype(np.int16))
|
| 76 |
return wav_file_path
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
# Define app name, app description, and examples
|
| 81 |
-
app_name = "PDF to Audio Converter"
|
| 82 |
-
app_description = "Convert text from a PDF file to audio. Upload a PDF file. We accept only PDF files with abstracts."
|
| 83 |
-
|
| 84 |
# Create the Gradio app
|
| 85 |
input_component = gr.File(file_types=["pdf"])
|
| 86 |
output_component = gr.Audio()
|
|
@@ -89,8 +83,7 @@ demo = gr.Interface(
|
|
| 89 |
fn=generate_audio_func,
|
| 90 |
inputs=input_component,
|
| 91 |
outputs=output_component,
|
| 92 |
-
title=
|
| 93 |
-
description=
|
| 94 |
-
)
|
| 95 |
|
| 96 |
demo.launch()
|
|
|
|
| 75 |
write_wav(wav_file_path, 22050, (audio_array * 32767).astype(np.int16))
|
| 76 |
return wav_file_path
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
# Create the Gradio app
|
| 79 |
input_component = gr.File(file_types=["pdf"])
|
| 80 |
output_component = gr.Audio()
|
|
|
|
| 83 |
fn=generate_audio_func,
|
| 84 |
inputs=input_component,
|
| 85 |
outputs=output_component,
|
| 86 |
+
title="Reading your abstract summary outloud",
|
| 87 |
+
description="Upload a PDF that contains an Abstract. Get your abstract summarized in 1 sentence and read outloud. We only accept with PDfs that contains the section Abstract"
|
|
|
|
| 88 |
|
| 89 |
demo.launch()
|