Spaces:
Runtime error
Runtime error
John Smith
commited on
Commit
·
56d3554
1
Parent(s):
f4e623b
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,11 @@ import numpy as np
|
|
7 |
model = load_model('eee.keras')
|
8 |
|
9 |
def image_mod(image):
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
resize = tf.image.resize(img, (256, 256))
|
12 |
plt.imshow(resize.numpy().astype(int))
|
13 |
yhat = model.predict(np.expand_dims(resize,0))
|
|
|
7 |
model = load_model('eee.keras')
|
8 |
|
9 |
def image_mod(image):
|
10 |
+
raw_image = image.read()
|
11 |
+
with open("temporary_image.jpg", "wb") as t:
|
12 |
+
t.write(raw_image)
|
13 |
+
|
14 |
+
img = cv2.imread("temporary_image.jpg")
|
15 |
resize = tf.image.resize(img, (256, 256))
|
16 |
plt.imshow(resize.numpy().astype(int))
|
17 |
yhat = model.predict(np.expand_dims(resize,0))
|