amendolajine commited on
Commit
962d09d
·
1 Parent(s): 520e96b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,8 +12,8 @@ synthesiser = pipeline("text-to-speech", "suno/bark")
12
 
13
  # Function to extract abstract from PDF
14
  def extract_abstract(pdf_file):
15
- # Read PDF file
16
- pdf_bytes = pdf_file.read()
17
 
18
  # Open PDF with fitz
19
  doc = fitz.open(stream=pdf_bytes, filetype="pdf")
 
12
 
13
  # Function to extract abstract from PDF
14
  def extract_abstract(pdf_file):
15
+ # Access the byte content of the uploaded file
16
+ pdf_bytes = pdf_file["data"]
17
 
18
  # Open PDF with fitz
19
  doc = fitz.open(stream=pdf_bytes, filetype="pdf")