Yatheshr commited on
Commit
8998039
·
verified ·
1 Parent(s): b27aefc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,8 @@ summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
9
  # Extract text from PDF
10
  def extract_text_from_pdf(file_obj):
11
  text = ""
12
- with fitz.open(stream=file_obj.read(), filetype="pdf") as doc:
 
13
  for page in doc:
14
  text += page.get_text()
15
  return text.strip().replace("\n", " ")
 
9
  # Extract text from PDF
10
  def extract_text_from_pdf(file_obj):
11
  text = ""
12
+ #with fitz.open(stream=file_obj.read(), filetype="pdf") as doc:
13
+ with fitz.open(pdf_file.name) as doc:
14
  for page in doc:
15
  text += page.get_text()
16
  return text.strip().replace("\n", " ")