Spaces:
Running
Running
file path errors
Browse files
app.py
CHANGED
@@ -2,8 +2,14 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
# import os
|
4 |
# Load a pre-trained image classification model
|
|
|
|
|
|
|
|
|
5 |
root = os.path.dirname(__file__)
|
6 |
|
|
|
|
|
7 |
def get_label(fname):
|
8 |
id = int(fname.name[-9:-4])
|
9 |
# print(id)
|
|
|
2 |
from fastai.vision.all import *
|
3 |
# import os
|
4 |
# Load a pre-trained image classification model
|
5 |
+
import pathlib
|
6 |
+
plt = platform.system()
|
7 |
+
if plt == 'Windows': pathlib.PosixPath = pathlib.WindowsPath
|
8 |
+
|
9 |
root = os.path.dirname(__file__)
|
10 |
|
11 |
+
|
12 |
+
|
13 |
def get_label(fname):
|
14 |
id = int(fname.name[-9:-4])
|
15 |
# print(id)
|