Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def predict(img):
|
|
13 |
images_list.append(np.array(img))
|
14 |
x = np.asarray(images_list)"""
|
15 |
prediction = model.predict(img)[0]
|
16 |
-
return {
|
17 |
|
18 |
image = gr.inputs.Image(shape=(160, 160))
|
19 |
label = gr.outputs.Label(num_top_classes=2)
|
|
|
13 |
images_list.append(np.array(img))
|
14 |
x = np.asarray(images_list)"""
|
15 |
prediction = model.predict(img)[0]
|
16 |
+
return {class_names[i]: float(prediction[i]) for i in range(len(class_names))}
|
17 |
|
18 |
image = gr.inputs.Image(shape=(160, 160))
|
19 |
label = gr.outputs.Label(num_top_classes=2)
|