Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ model = load_model('Pikachu_and_Raichu.h5')
|
|
| 8 |
labels = ['Pikachu', 'Raichu']
|
| 9 |
|
| 10 |
def predict(img):
|
| 11 |
-
img=img.reshape(-1,
|
| 12 |
"""images_list = []
|
| 13 |
images_list.append(np.array(img))
|
| 14 |
x = np.asarray(images_list)"""
|
|
@@ -17,7 +17,7 @@ def predict(img):
|
|
| 17 |
confidences = {labels[i]: float(prediction[i]) for i in range(2)}
|
| 18 |
return confidences
|
| 19 |
|
| 20 |
-
image = gr.inputs.Image(shape=(
|
| 21 |
label = gr.outputs.Label(num_top_classes=2)
|
| 22 |
|
| 23 |
gr.Interface(fn=predict, inputs=image, title="Garbage Classifier",
|
|
|
|
| 8 |
labels = ['Pikachu', 'Raichu']
|
| 9 |
|
| 10 |
def predict(img):
|
| 11 |
+
img=img.reshape(-1,160,160,3)
|
| 12 |
"""images_list = []
|
| 13 |
images_list.append(np.array(img))
|
| 14 |
x = np.asarray(images_list)"""
|
|
|
|
| 17 |
confidences = {labels[i]: float(prediction[i]) for i in range(2)}
|
| 18 |
return confidences
|
| 19 |
|
| 20 |
+
image = gr.inputs.Image(shape=(160, 160))
|
| 21 |
label = gr.outputs.Label(num_top_classes=2)
|
| 22 |
|
| 23 |
gr.Interface(fn=predict, inputs=image, title="Garbage Classifier",
|