Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,18 +11,18 @@ def summarize_pdf (pdf_file_path, custom_prompt=""):
|
|
| 11 |
|
| 12 |
return summary
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
|
| 27 |
if __name__ == "__main__":
|
| 28 |
interface.launch()
|
|
|
|
| 11 |
|
| 12 |
return summary
|
| 13 |
|
| 14 |
+
|
| 15 |
+
input_pdf_path = gr.inputs.Textbox(label="Enter the PDF file path")
|
| 16 |
+
output_summary = gr.outputs.Textbox(label="Summary")
|
| 17 |
|
| 18 |
+
interface = gr.Interface(
|
| 19 |
+
fn = summarize_pdf,
|
| 20 |
+
inputs = input_pdf_path,
|
| 21 |
+
outputs = output_summary,
|
| 22 |
+
title = "PDF Summarizer",
|
| 23 |
+
description = "This app allows you to summarize your PDF files.",
|
| 24 |
+
)
|
| 25 |
+
demo.launch(share=True)
|
| 26 |
|
| 27 |
if __name__ == "__main__":
|
| 28 |
interface.launch()
|