Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -24,9 +24,6 @@ with gr.Blocks() as demo:
|
|
24 |
|
25 |
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
|
26 |
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
|
27 |
-
|
28 |
-
# Normalize the pixel values
|
29 |
-
img = np.array(img) / 255.0
|
30 |
|
31 |
# clothing dataset
|
32 |
mnist = tf.keras.datasets.mnist
|
@@ -72,7 +69,10 @@ with gr.Blocks() as demo:
|
|
72 |
|
73 |
def classifyImage(img):
|
74 |
#global probability_model
|
75 |
-
#global class_names
|
|
|
|
|
|
|
76 |
|
77 |
input_array = np.expand_dims(img, axis=0) # add an extra dimension to represent the batch size
|
78 |
|
|
|
24 |
|
25 |
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
|
26 |
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
|
|
|
|
|
|
|
27 |
|
28 |
# clothing dataset
|
29 |
mnist = tf.keras.datasets.mnist
|
|
|
69 |
|
70 |
def classifyImage(img):
|
71 |
#global probability_model
|
72 |
+
#global class_names
|
73 |
+
|
74 |
+
# Normalize the pixel values
|
75 |
+
img = np.array(img) / 255.0
|
76 |
|
77 |
input_array = np.expand_dims(img, axis=0) # add an extra dimension to represent the batch size
|
78 |
|