Spaces:
Sleeping
Sleeping
trying to fix path
Browse files- __pycache__/predict.cpython-311.pyc +0 -0
- __pycache__/tools.cpython-311.pyc +0 -0
- predict.py +5 -1
__pycache__/predict.cpython-311.pyc
DELETED
|
Binary file (2.98 kB)
|
|
|
__pycache__/tools.cpython-311.pyc
DELETED
|
Binary file (3.56 kB)
|
|
|
predict.py
CHANGED
|
@@ -3,7 +3,7 @@ File: recognize.py
|
|
| 3 |
Project: BulgarianPatternsRecognizer
|
| 4 |
Author: Milko Videv (milko.videv@thalesgroup.com)
|
| 5 |
-----
|
| 6 |
-
Last Modified: Tuesday, 5th March 2024
|
| 7 |
Modified By: Milko Videv (milko.videv@thalesgroup.com>)
|
| 8 |
-----
|
| 9 |
Copyright 2017 - 2024, Thales DIS, MCS SSH
|
|
@@ -16,6 +16,10 @@ Date By Comments
|
|
| 16 |
from fastcore.all import *
|
| 17 |
from fastai.vision.all import *
|
| 18 |
from tools import *
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
learn = load_learner("./models/trained.pkl")
|
| 21 |
labels = learn.dls.vocab
|
|
|
|
| 3 |
Project: BulgarianPatternsRecognizer
|
| 4 |
Author: Milko Videv (milko.videv@thalesgroup.com)
|
| 5 |
-----
|
| 6 |
+
Last Modified: Tuesday, 5th March 2024 7:00:29 pm
|
| 7 |
Modified By: Milko Videv (milko.videv@thalesgroup.com>)
|
| 8 |
-----
|
| 9 |
Copyright 2017 - 2024, Thales DIS, MCS SSH
|
|
|
|
| 16 |
from fastcore.all import *
|
| 17 |
from fastai.vision.all import *
|
| 18 |
from tools import *
|
| 19 |
+
import pathlib
|
| 20 |
+
|
| 21 |
+
plt = platform.system()
|
| 22 |
+
if plt != 'Windows': pathlib.WindowsPath = pathlib.PosixPath
|
| 23 |
|
| 24 |
learn = load_learner("./models/trained.pkl")
|
| 25 |
labels = learn.dls.vocab
|