Spaces:
Sleeping
Sleeping
Rivalcoder
commited on
Commit
·
6928eef
1
Parent(s):
fa698d7
Add application file
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ def extract_text_from_pdf(file):
|
|
6 |
return "No file uploaded."
|
7 |
|
8 |
try:
|
9 |
-
doc = fitz.open(
|
10 |
full_text = ""
|
11 |
for page_num in range(len(doc)):
|
12 |
page = doc.load_page(page_num)
|
|
|
6 |
return "No file uploaded."
|
7 |
|
8 |
try:
|
9 |
+
doc = fitz.open(file.name) # Use file path directly
|
10 |
full_text = ""
|
11 |
for page_num in range(len(doc)):
|
12 |
page = doc.load_page(page_num)
|