pragnakalp
commited on
Commit
•
c0ff73d
1
Parent(s):
5454a24
Update app.py
Browse files
app.py
CHANGED
@@ -68,9 +68,9 @@ def ocr_with_easy(img):
|
|
68 |
Generate OCR
|
69 |
"""
|
70 |
def generate_ocr(Method,img):
|
71 |
-
|
|
|
72 |
if (img).any():
|
73 |
-
text_output = ''
|
74 |
add_csv = []
|
75 |
image_id = 1
|
76 |
print("Method___________________",Method)
|
@@ -82,7 +82,7 @@ def generate_ocr(Method,img):
|
|
82 |
text_output = ocr_with_paddle(img)
|
83 |
|
84 |
flag(Method,text_output,img)
|
85 |
-
|
86 |
else:
|
87 |
raise gr.Error("Please upload an image!!!!")
|
88 |
|
|
|
68 |
Generate OCR
|
69 |
"""
|
70 |
def generate_ocr(Method,img):
|
71 |
+
|
72 |
+
text_output = ''
|
73 |
if (img).any():
|
|
|
74 |
add_csv = []
|
75 |
image_id = 1
|
76 |
print("Method___________________",Method)
|
|
|
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!!!!")
|
88 |
|