Regino commited on
Commit
4c69665
·
1 Parent(s): 8d54f3a
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -6,6 +6,11 @@ from sumy.nlp.tokenizers import Tokenizer
6
  from sumy.summarizers.lsa import LsaSummarizer
7
  from rouge_score import rouge_scorer # For ROUGE score evaluation
8
 
 
 
 
 
 
9
  # Function to extract text from PDF
10
  def extract_text_from_pdf(uploaded_file):
11
  doc = fitz.open(stream=uploaded_file.read(), filetype="pdf")
 
6
  from sumy.summarizers.lsa import LsaSummarizer
7
  from rouge_score import rouge_scorer # For ROUGE score evaluation
8
 
9
+ import nltk
10
+
11
+ # Ensure the necessary tokenizer is downloaded
12
+ nltk.download("punkt")
13
+
14
  # Function to extract text from PDF
15
  def extract_text_from_pdf(uploaded_file):
16
  doc = fitz.open(stream=uploaded_file.read(), filetype="pdf")