made relative path to model

This commit is contained in:
= 2020-05-20 08:30:30 +02:00
parent 6dbec012a7
commit 0bfeeb2486
2 changed files with 8 additions and 1 deletions

View File

@ -103,7 +103,10 @@ class LoadModelThread(threading.Thread):
self.__runThread = True self.__runThread = True
def run(self): def run(self):
model_path = 'D:\\Nauka\\Studia\\4_sem\\SztucznaInteligencja\\ProjektAI\\kelner\\src\\algorithms\\CNN\\trainedModels\\big_model_trained_3class.hdf5' cwd = os.getcwd()
print(cwd)
model_path = os.path.join(cwd, 'src', 'algorithms', 'CNN', 'trainedModels', 'big_model_trained_3class.hdf5')
# model_path = 'D:\\Nauka\\Studia\\4_sem\\SztucznaInteligencja\\ProjektAI\\kelner\\src\\algorithms\\CNN\\trainedModels\\big_model_trained_3class.hdf5'
model = load_model(model_path) model = load_model(model_path)
settings.tensorflowModel = model settings.tensorflowModel = model
print("---MODEL LOADED---") print("---MODEL LOADED---")

View File

@ -33,10 +33,14 @@ class TableManager(threading.Thread):
tables = self.__drawableManager.getTables(Status.Waiting) tables = self.__drawableManager.getTables(Status.Waiting)
for table in tables: for table in tables:
if (table.getX(), table.getY()) == position: if (table.getX(), table.getY()) == position:
return table return table
def pause(self): def pause(self):
self._active = False self._active = False
def stop(self):
self.__runThread = False
def resume(self): def resume(self):
self._active = True self._active = True