Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,7 @@ model=tf.keras.models.load_model('./my_model')
|
|
12 |
def import_and_predict(image_data):
|
13 |
x = image_data.reshape((-1, 224, 224, 3))
|
14 |
x /= 255
|
15 |
-
|
16 |
-
image = np.vstack([x])
|
17 |
-
prediction = model.predict(image)
|
18 |
labels=class_names
|
19 |
confidences = {labels[i]: float(prediction[0][i]) for i in range(15)}
|
20 |
return confidences
|
|
|
12 |
def import_and_predict(image_data):
|
13 |
x = image_data.reshape((-1, 224, 224, 3))
|
14 |
x /= 255
|
15 |
+
prediction = model.predict(x)
|
|
|
|
|
16 |
labels=class_names
|
17 |
confidences = {labels[i]: float(prediction[0][i]) for i in range(15)}
|
18 |
return confidences
|