Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,9 +18,14 @@ def classify_image(image):
|
|
| 18 |
confidence = np.max(predictions[0])
|
| 19 |
return predicted_class, confidence
|
| 20 |
|
| 21 |
-
image_input = gr.
|
| 22 |
-
label = gr.
|
| 23 |
|
| 24 |
-
gr.Interface(
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
description='Upload an image of Jolteon, Kakuna, Mr. Mime and the classifier will tell you which one it is and the confidence level of the prediction.').launch()
|
|
|
|
|
|
|
|
|
| 18 |
confidence = np.max(predictions[0])
|
| 19 |
return predicted_class, confidence
|
| 20 |
|
| 21 |
+
image_input = gr.Image(shape=(160, 160))
|
| 22 |
+
label = gr.Label(num_top_classes=3)
|
| 23 |
|
| 24 |
+
iface = gr.Interface(
|
| 25 |
+
fn=classify_image,
|
| 26 |
+
inputs=image_input,
|
| 27 |
+
outputs=label,
|
| 28 |
+
title='Pokémon Classifier',
|
| 29 |
description='Upload an image of Jolteon, Kakuna, Mr. Mime and the classifier will tell you which one it is and the confidence level of the prediction.').launch()
|
| 30 |
+
|
| 31 |
+
iface.launch()
|