Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def pdf_pil(file_path,page_num):
|
|
69 |
pdf = pdfium.PdfDocument("data.pdf")
|
70 |
#n_pages = len(pdf)
|
71 |
#for page_number in range(n_pages):
|
72 |
-
page = pdf.get_page(int(page_num))
|
73 |
bitmap = page.render(
|
74 |
scale = 1, # 72dpi resolution
|
75 |
rotation = 0, # no additional rotation
|
@@ -88,7 +88,7 @@ def ocrpdf(file_path,pdf_lang,page_num):
|
|
88 |
|
89 |
for bound in bounds:
|
90 |
print(bound[1])
|
91 |
-
|
92 |
|
93 |
def scrape(instring):
|
94 |
html_src=(f'''
|
|
|
69 |
pdf = pdfium.PdfDocument("data.pdf")
|
70 |
#n_pages = len(pdf)
|
71 |
#for page_number in range(n_pages):
|
72 |
+
page = pdf.get_page(int(page_num)-1)
|
73 |
bitmap = page.render(
|
74 |
scale = 1, # 72dpi resolution
|
75 |
rotation = 0, # no additional rotation
|
|
|
88 |
|
89 |
for bound in bounds:
|
90 |
print(bound[1])
|
91 |
+
|
92 |
|
93 |
def scrape(instring):
|
94 |
html_src=(f'''
|