Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ import datasets
|
|
16 |
from datasets import load_dataset, Image
|
17 |
from PIL import Image
|
18 |
from paddleocr import PaddleOCR
|
19 |
-
|
20 |
|
21 |
"""
|
22 |
Paddle OCR
|
@@ -81,10 +81,7 @@ def generate_ocr(Method,img):
|
|
81 |
if Method == 'PaddleOCR':
|
82 |
text_output = ocr_with_paddle(img)
|
83 |
|
84 |
-
|
85 |
-
flag(Method,text_output,img)
|
86 |
-
except Exception as e:
|
87 |
-
print(e)
|
88 |
return text_output
|
89 |
else:
|
90 |
raise gr.Error("Please upload an image!!!!")
|
|
|
16 |
from datasets import load_dataset, Image
|
17 |
from PIL import Image
|
18 |
from paddleocr import PaddleOCR
|
19 |
+
|
20 |
|
21 |
"""
|
22 |
Paddle OCR
|
|
|
81 |
if Method == 'PaddleOCR':
|
82 |
text_output = ocr_with_paddle(img)
|
83 |
|
84 |
+
|
|
|
|
|
|
|
85 |
return text_output
|
86 |
else:
|
87 |
raise gr.Error("Please upload an image!!!!")
|