Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ DEFAULT_PDF_PATH = "教材.pdf"
|
|
| 17 |
|
| 18 |
# 解析 PDF 並擷取文本(使用開發者預設的教材)
|
| 19 |
def extract_text_from_pdf():
|
| 20 |
-
with open(DEFAULT_PDF_PATH, "
|
| 21 |
reader = PyPDF2.PdfReader(pdf_file)
|
| 22 |
text = ""
|
| 23 |
for page in reader.pages:
|
|
|
|
| 17 |
|
| 18 |
# 解析 PDF 並擷取文本(使用開發者預設的教材)
|
| 19 |
def extract_text_from_pdf():
|
| 20 |
+
with open(DEFAULT_PDF_PATH, "教材.pdf") as pdf_file:
|
| 21 |
reader = PyPDF2.PdfReader(pdf_file)
|
| 22 |
text = ""
|
| 23 |
for page in reader.pages:
|