Spaces:
Runtime error
Runtime error
Commit
·
a8a9728
1
Parent(s):
08d42b2
fixed windows conflict
Browse files
app.py
CHANGED
|
@@ -5,6 +5,10 @@ def classify_img(img):
|
|
| 5 |
pred , idx , probs = learn.predict(img)
|
| 6 |
return dict(zip(categories , map(float , probs)))
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
learn = load_learner('bears_model.pkl')
|
| 9 |
|
| 10 |
categories = ( 'black bear','grizzly bear' , 'teddy bear')
|
|
|
|
| 5 |
pred , idx , probs = learn.predict(img)
|
| 6 |
return dict(zip(categories , map(float , probs)))
|
| 7 |
|
| 8 |
+
import pathlib
|
| 9 |
+
plt = platform.system()
|
| 10 |
+
if plt == 'Linux': pathlib.WindowsPath = pathlib.PosixPath
|
| 11 |
+
|
| 12 |
learn = load_learner('bears_model.pkl')
|
| 13 |
|
| 14 |
categories = ( 'black bear','grizzly bear' , 'teddy bear')
|