Spaces:
Sleeping
Sleeping
Commit
·
962d09d
1
Parent(s):
520e96b
Update app.py
Browse files
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 |
-
#
|
| 16 |
-
pdf_bytes = pdf_file
|
| 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")
|