saritha5 commited on
Commit
21534bf
·
1 Parent(s): eb485ea

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(imgpath):
98
  im = []
99
- st.header(imgpath)
 
100
  #image=cv2.imread(imgpath)
101
 
102
  #imgplot = plt.imshow(image)
103
  #plt.show()
104
- img = Image.fromarray(imgpath, 'RGB')
105
  resize_image = img.resize((50, 50))
106
  im.append(np.array(resize_image))
107
  fv = np.array(im)
 
96
  #plt. figure(figsize=(10,9))
97
  def occ_predict(imgpath):
98
  im = []
99
+ pil_image = Image.open(imgpath)
100
+ #st.header(imgpath)
101
  #image=cv2.imread(imgpath)
102
 
103
  #imgplot = plt.imshow(image)
104
  #plt.show()
105
+ img = Image.fromarray(pil_image, 'RGB')
106
  resize_image = img.resize((50, 50))
107
  im.append(np.array(resize_image))
108
  fv = np.array(im)