Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,12 +82,18 @@ def pdf_pil(file_path,page_num):
|
|
| 82 |
|
| 83 |
def ocrpdf(file_path,pdf_lang,page_num):
|
| 84 |
img1=pdf_pil(file_path,page_num)
|
|
|
|
| 85 |
lang=[f"{ocr_id[pdf_lang]}"]
|
|
|
|
| 86 |
reader = easyocr.Reader(lang)
|
|
|
|
| 87 |
bounds = reader.readtext(img1)
|
| 88 |
-
|
|
|
|
|
|
|
| 89 |
for bound in bounds:
|
| 90 |
-
|
|
|
|
| 91 |
|
| 92 |
|
| 93 |
def scrape(instring):
|
|
|
|
| 82 |
|
| 83 |
def ocrpdf(file_path,pdf_lang,page_num):
|
| 84 |
img1=pdf_pil(file_path,page_num)
|
| 85 |
+
print("DONE 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
| 86 |
lang=[f"{ocr_id[pdf_lang]}"]
|
| 87 |
+
print("DONE 2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
| 88 |
reader = easyocr.Reader(lang)
|
| 89 |
+
print("DONE 3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
| 90 |
bounds = reader.readtext(img1)
|
| 91 |
+
print("DONE 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
| 92 |
+
|
| 93 |
+
|
| 94 |
for bound in bounds:
|
| 95 |
+
this = (f'{this}'+f'{bound[1]}')
|
| 96 |
+
print(this)
|
| 97 |
|
| 98 |
|
| 99 |
def scrape(instring):
|