Spaces:
Runtime error
Runtime error
ttcielott
commited on
Commit
•
ca21dff
1
Parent(s):
2dd075e
remove .item() code.
Browse files
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]
|
13 |
img_sugg = PILImage.create(file_name)
|
14 |
-
return f'Is this {labels[highest_prob]
|
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 |
|