Sa-m commited on
Commit
1f1c04d
·
1 Parent(s): 01a716c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,9 +18,9 @@ def classify_image(inp):
18
  inp = inp.reshape((-1, HEIGHT,WIDTH, 3))
19
  inp = tf.keras.applications.nasnet.preprocess_input(inp)
20
  prediction = model.predict(inp)
21
- labels = dict((v,k) for k,v in labels.items())
22
  predicted_class_indices=np.argmax(prediction,axis=1)
23
- return {labels[i]: float(predicted_class_indices[i]) for i in range(NUM_CLASSES)}
24
 
25
 
26
 
 
18
  inp = inp.reshape((-1, HEIGHT,WIDTH, 3))
19
  inp = tf.keras.applications.nasnet.preprocess_input(inp)
20
  prediction = model.predict(inp)
21
+ label = dict((v,k) for k,v in labels.items())
22
  predicted_class_indices=np.argmax(prediction,axis=1)
23
+ return {label[i]: float(predicted_class_indices[i]) for i in range(NUM_CLASSES)}
24
 
25
 
26