Spaces:
Runtime error
Runtime error
debu das commited on
Commit ·
b2b7097
1
Parent(s): 2208ac7
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,4 +47,9 @@ if submit:
|
|
| 47 |
bytes_data = uploaded_file.read()
|
| 48 |
image = Image.open(io.BytesIO(bytes_data))
|
| 49 |
st.image(image, caption='your img')
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
bytes_data = uploaded_file.read()
|
| 48 |
image = Image.open(io.BytesIO(bytes_data))
|
| 49 |
st.image(image, caption='your img')
|
| 50 |
+
pil_image=image.convert('RGB')
|
| 51 |
+
open_cv_image = numpy.array(pil_image)
|
| 52 |
+
# Convert RGB to BGR
|
| 53 |
+
open_cv_image = open_cv_image[:, :, ::-1].copy()
|
| 54 |
+
|
| 55 |
+
ocr(open_cv_image,'ch')
|