Spaces:
Sleeping
Sleeping
pragnakalp
commited on
Commit
•
9e79a73
1
Parent(s):
c10e31c
Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,10 @@ from datetime import datetime
|
|
13 |
import scipy.ndimage.interpolation as inter
|
14 |
import easyocr
|
15 |
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
|
@@ -80,7 +80,8 @@ def generate_ocr(Method,img):
|
|
80 |
text_output = ocr_with_keras(img)
|
81 |
if Method == 'PaddleOCR':
|
82 |
text_output = ocr_with_paddle(img)
|
83 |
-
|
|
|
84 |
return text_output
|
85 |
else:
|
86 |
raise gr.Error("Please upload an image!!!!")
|
|
|
13 |
import scipy.ndimage.interpolation as inter
|
14 |
import easyocr
|
15 |
import datasets
|
16 |
+
from datasets import load_dataset, Image
|
17 |
from PIL import Image
|
18 |
from paddleocr import PaddleOCR
|
19 |
+
from save_data import flag
|
20 |
|
21 |
"""
|
22 |
Paddle OCR
|
|
|
80 |
text_output = ocr_with_keras(img)
|
81 |
if Method == 'PaddleOCR':
|
82 |
text_output = ocr_with_paddle(img)
|
83 |
+
|
84 |
+
flag(Method,text_output,img)
|
85 |
return text_output
|
86 |
else:
|
87 |
raise gr.Error("Please upload an image!!!!")
|