Spaces:
Running
Running
EmreYY20
commited on
Commit
·
a0ac68c
1
Parent(s):
b3ec0ef
update
Browse files- app.py +1 -1
- extractive_model.py +1 -1
app.py
CHANGED
|
@@ -11,7 +11,7 @@ if pdf_file is not None and st.button("Summarize"):
|
|
| 11 |
f.write(pdf_file.getbuffer())
|
| 12 |
|
| 13 |
# Generate summary
|
| 14 |
-
summary = summarize_pdf_with_textrank("temp_pdf.pdf"
|
| 15 |
|
| 16 |
# Display summary
|
| 17 |
st.write("Summary:")
|
|
|
|
| 11 |
f.write(pdf_file.getbuffer())
|
| 12 |
|
| 13 |
# Generate summary
|
| 14 |
+
summary = summarize_pdf_with_textrank("temp_pdf.pdf")
|
| 15 |
|
| 16 |
# Display summary
|
| 17 |
st.write("Summary:")
|
extractive_model.py
CHANGED
|
@@ -16,7 +16,7 @@ from sumy.summarizers.text_rank import TextRankSummarizer
|
|
| 16 |
import nltk
|
| 17 |
nltk.download('punkt')
|
| 18 |
|
| 19 |
-
def summarize_pdf_with_textrank(pdf_path, sentences_count=
|
| 20 |
"""
|
| 21 |
Summarizes the content of a PDF file using TextRank algorithm.
|
| 22 |
|
|
|
|
| 16 |
import nltk
|
| 17 |
nltk.download('punkt')
|
| 18 |
|
| 19 |
+
def summarize_pdf_with_textrank(pdf_path, sentences_count=5):
|
| 20 |
"""
|
| 21 |
Summarizes the content of a PDF file using TextRank algorithm.
|
| 22 |
|