suddu21 commited on
Commit
78bfd45
1 Parent(s): cd2900f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ classnames = ['cardboard', 'metal','paper','plastic','trash','green-glass','whit
10
  def predict(img):
11
  img=img.reshape(-1,298, 384,3)
12
  prediction = model.predict(img[0])
13
- return {classnames[i]: float(prediction[i]) for i in range(12)}
14
 
15
  image = gr.inputs.Image(shape=(298, 384))
16
  label = gr.outputs.Label(num_top_classes=3)
 
10
  def predict(img):
11
  img=img.reshape(-1,298, 384,3)
12
  prediction = model.predict(img[0])
13
+ return {classnames[i]: float(prediction[i]) for i in range(len(classnames)}
14
 
15
  image = gr.inputs.Image(shape=(298, 384))
16
  label = gr.outputs.Label(num_top_classes=3)