From e0b3df21689efa6f43c54f1393bb323cb3326281 Mon Sep 17 00:00:00 2001 From: it-fm <42847248+it-fm@users.noreply.github.com> Date: Wed, 26 Jun 2019 17:56:58 -0300 Subject: [PATCH] Add os path dir name function on loading model --- real_time_gesture_detection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/real_time_gesture_detection.py b/real_time_gesture_detection.py index 2405dc3..f6de82c 100644 --- a/real_time_gesture_detection.py +++ b/real_time_gesture_detection.py @@ -8,6 +8,7 @@ from soco import SoCo import pygame import time +import os # General Settings prediction = '' @@ -53,7 +54,7 @@ def decrease(self, amount): 3: 'Palm', 4: 'Peace'} -model = load_model('/Users/brenner/project_kojak/models/VGG_cross_validated.h5') +model = load_model(os.path.dirname(os.path.realpath(__file__)) + '/models/VGG_cross_validated.h5') def predict_rgb_image(img):