Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,15 @@
|
|
| 1 |
from fastai.vision.all import *
|
| 2 |
import gradio as gr
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
def old_or_not(x):
|
| 5 |
return x[0].isupper()
|
| 6 |
|
| 7 |
|
| 8 |
-
learn =
|
| 9 |
|
| 10 |
|
| 11 |
categories = ['New_car', 'Old_car']
|
|
|
|
| 1 |
from fastai.vision.all import *
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
import pathlib
|
| 5 |
+
plt = platform.system()
|
| 6 |
+
if plt == 'Linux': pathlib.WindowsPath = pathlib.PosixPath
|
| 7 |
+
|
| 8 |
def old_or_not(x):
|
| 9 |
return x[0].isupper()
|
| 10 |
|
| 11 |
|
| 12 |
+
learn = load_learner('model.pkl')
|
| 13 |
|
| 14 |
|
| 15 |
categories = ['New_car', 'Old_car']
|