Spaces:
Sleeping
Sleeping
pragnakalp
commited on
Commit
•
77e3aab
1
Parent(s):
84d42f7
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,6 @@ Paddle OCR
|
|
25 |
@spaces.GPU
|
26 |
def ocr_with_paddle(img):
|
27 |
finaltext = ''
|
28 |
-
paddle.set_device('gpu')
|
29 |
ocr = PaddleOCR(lang='en',use_angle_cls=True)
|
30 |
# img_path = 'exp.jpeg'
|
31 |
result = ocr.ocr(img)
|
@@ -39,6 +38,7 @@ def ocr_with_paddle(img):
|
|
39 |
"""
|
40 |
Keras OCR
|
41 |
"""
|
|
|
42 |
def ocr_with_keras(img):
|
43 |
output_text = ''
|
44 |
pipeline=keras_ocr.pipeline.Pipeline()
|
|
|
25 |
@spaces.GPU
|
26 |
def ocr_with_paddle(img):
|
27 |
finaltext = ''
|
|
|
28 |
ocr = PaddleOCR(lang='en',use_angle_cls=True)
|
29 |
# img_path = 'exp.jpeg'
|
30 |
result = ocr.ocr(img)
|
|
|
38 |
"""
|
39 |
Keras OCR
|
40 |
"""
|
41 |
+
@spaces.GPU
|
42 |
def ocr_with_keras(img):
|
43 |
output_text = ''
|
44 |
pipeline=keras_ocr.pipeline.Pipeline()
|