Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,12 +96,13 @@ else:
|
|
96 |
#plt. figure(figsize=(10,9))
|
97 |
def occ_predict(imgpath):
|
98 |
im = []
|
99 |
-
|
|
|
100 |
#image=cv2.imread(imgpath)
|
101 |
|
102 |
#imgplot = plt.imshow(image)
|
103 |
#plt.show()
|
104 |
-
img = Image.fromarray(
|
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)
|