Spaces:
Runtime error
Runtime error
Commit
·
db9993b
1
Parent(s):
5e9c05b
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,10 @@ import cv2
|
|
| 6 |
|
| 7 |
img_size = 28
|
| 8 |
model = from_pretrained_keras("keras-io/keras-reptile")
|
| 9 |
-
examples =
|
|
|
|
|
|
|
|
|
|
| 10 |
def inference(original_image):
|
| 11 |
image = tf.keras.utils.img_to_array(original_image)
|
| 12 |
image = image.astype("float32") / 255.0
|
|
@@ -37,7 +40,7 @@ description = "Upload an image or select from examples to classify fashion items
|
|
| 37 |
interface = gr.Interface(
|
| 38 |
fn = inference,
|
| 39 |
title = "Few shot learning with Reptile",
|
| 40 |
-
description = "Keras Implementation of Reptile
|
| 41 |
inputs = gr.inputs.Image(shape=(28, 28, 1)),
|
| 42 |
outputs = "text",
|
| 43 |
examples = examples,
|
|
|
|
| 6 |
|
| 7 |
img_size = 28
|
| 8 |
model = from_pretrained_keras("keras-io/keras-reptile")
|
| 9 |
+
examples = examples = [
|
| 10 |
+
['./example0.JPG'],
|
| 11 |
+
['./example1.JPG']
|
| 12 |
+
]
|
| 13 |
def inference(original_image):
|
| 14 |
image = tf.keras.utils.img_to_array(original_image)
|
| 15 |
image = image.astype("float32") / 255.0
|
|
|
|
| 40 |
interface = gr.Interface(
|
| 41 |
fn = inference,
|
| 42 |
title = "Few shot learning with Reptile",
|
| 43 |
+
description = "Keras Implementation of Reptile",
|
| 44 |
inputs = gr.inputs.Image(shape=(28, 28, 1)),
|
| 45 |
outputs = "text",
|
| 46 |
examples = examples,
|