saritha5 commited on
Commit
14d5391
·
1 Parent(s): 6c49060

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -96,12 +96,13 @@ else:
96
  #plt. figure(figsize=(10,9))
97
  def occ_predict(img_content):
98
  im = []
99
- image1 = plt.imread(img_content)
 
100
 
101
  #st.write(img_content)
102
  #st.write(type(img_content))
103
 
104
- img = Image.fromarray(image1, 'RGB')
105
  #st.write(type(image1))
106
  resize_image = img.resize((50, 50))
107
  im.append(np.array(resize_image))
 
96
  #plt. figure(figsize=(10,9))
97
  def occ_predict(img_content):
98
  im = []
99
+ image = cv2.imread(img_content)
100
+ imgplot = plt.show(image)
101
 
102
  #st.write(img_content)
103
  #st.write(type(img_content))
104
 
105
+ img = Image.fromarray(image, 'RGB')
106
  #st.write(type(image1))
107
  resize_image = img.resize((50, 50))
108
  im.append(np.array(resize_image))