LPX55 commited on
Commit
1e046c9
·
verified ·
1 Parent(s): 50d9ba1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def predict_image(img):
18
  img = transforms.Resize((256,256))(img)
19
  prediction=clf.predict(img)
20
  print(prediction)
21
- print(model.config.id2label[predicted_label])
22
  return {class_names[i]: float(prediction[i]["score"]) for i in range(2)}
23
 
24
  image = gr.Image(label="Image to Analyze", sources=['upload'])
 
18
  img = transforms.Resize((256,256))(img)
19
  prediction=clf.predict(img)
20
  print(prediction)
21
+
22
  return {class_names[i]: float(prediction[i]["score"]) for i in range(2)}
23
 
24
  image = gr.Image(label="Image to Analyze", sources=['upload'])