Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,10 @@ from fastai.vision.all import *
|
|
2 |
import gradio as gr
|
3 |
learn = load_learner('export.pkl')
|
4 |
import platform
|
5 |
-
import pathlib
|
|
|
|
|
|
|
6 |
actors = learn.dls.vocab
|
7 |
def classify_images(img):
|
8 |
pred, idx, prob = learn.predict(img)
|
|
|
2 |
import gradio as gr
|
3 |
learn = load_learner('export.pkl')
|
4 |
import platform
|
5 |
+
import pathlib
|
6 |
+
plt = platform.system()
|
7 |
+
if plt == 'Linux':
|
8 |
+
pathlib.WindowsPath = pathlib.PosixPath
|
9 |
actors = learn.dls.vocab
|
10 |
def classify_images(img):
|
11 |
pred, idx, prob = learn.predict(img)
|