debu das commited on
Commit
b2b7097
1 Parent(s): 2208ac7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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
- ocr(image,'ch')
 
 
 
 
 
 
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')