ttcielott commited on
Commit
ca21dff
1 Parent(s): 2dd075e

remove .item() code.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,9 +9,9 @@ def predict(img):
9
  img = PILImage.create(img)
10
  pred, pred_idx, probs = learn.predict(img)
11
  highest_prob = probs.argmax()
12
- file_name = f"{labels[highest_prob].split(' ')[0].item()}_sugg.png"
13
  img_sugg = PILImage.create(file_name)
14
- return f'Is this {labels[highest_prob].item()}?', img_sugg
15
 
16
  picture = st.camera_input("Take a picture")
17
 
 
9
  img = PILImage.create(img)
10
  pred, pred_idx, probs = learn.predict(img)
11
  highest_prob = probs.argmax()
12
+ file_name = f"{labels[highest_prob].split(' ')[0]}_sugg.png"
13
  img_sugg = PILImage.create(file_name)
14
+ return f'Is this {labels[highest_prob]}?', img_sugg
15
 
16
  picture = st.camera_input("Take a picture")
17