Update app.py
Browse files
app.py
CHANGED
|
@@ -21,11 +21,11 @@ def img_prep(paths):
|
|
| 21 |
for i in paths:
|
| 22 |
img = Image.open(i)
|
| 23 |
img = img.resize((256,256))
|
| 24 |
-
img = ((np.asarray(img))/127.5)-1
|
| 25 |
out.append(img)
|
| 26 |
return out
|
| 27 |
|
| 28 |
def model_out(img,model_path):
|
|
|
|
| 29 |
img = np.expand_dims(img,0)
|
| 30 |
model = load_model(model_path)
|
| 31 |
pred = model.predict(img)
|
|
|
|
| 21 |
for i in paths:
|
| 22 |
img = Image.open(i)
|
| 23 |
img = img.resize((256,256))
|
|
|
|
| 24 |
out.append(img)
|
| 25 |
return out
|
| 26 |
|
| 27 |
def model_out(img,model_path):
|
| 28 |
+
img = ((np.asarray(img))/127.5)-1
|
| 29 |
img = np.expand_dims(img,0)
|
| 30 |
model = load_model(model_path)
|
| 31 |
pred = model.predict(img)
|