Spaces:
Sleeping
Sleeping
neerajkalyank
commited on
Commit
•
a8af579
1
Parent(s):
78306b8
Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ processor = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-
|
|
11 |
model = VisionEncoderDecoderModel.from_pretrained("naver-clova-ix/donut-base-finetuned-cord-v2")
|
12 |
|
13 |
def extract_data_from_pdf(pdf_file):
|
14 |
-
# Open the PDF file
|
15 |
-
doc = fitz.open(
|
16 |
text_data = []
|
17 |
|
18 |
for page_num in range(doc.page_count):
|
|
|
11 |
model = VisionEncoderDecoderModel.from_pretrained("naver-clova-ix/donut-base-finetuned-cord-v2")
|
12 |
|
13 |
def extract_data_from_pdf(pdf_file):
|
14 |
+
# Open the PDF file using the path provided by gr.File
|
15 |
+
doc = fitz.open(pdf_file.name)
|
16 |
text_data = []
|
17 |
|
18 |
for page_num in range(doc.page_count):
|