Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ from PIL import Image
|
|
5 |
import sqlite3
|
6 |
import cv2
|
7 |
import numpy as np
|
|
|
8 |
|
9 |
# Constants
|
10 |
HOME_DIR = os.getcwd() # Home directory to save images (root directory)
|
@@ -34,7 +35,7 @@ except Exception as e:
|
|
34 |
|
35 |
# Load the emotion detection model
|
36 |
try:
|
37 |
-
emotion_model = load_model(EMOTION_MODEL_FILE)
|
38 |
except Exception as e:
|
39 |
st.error(f"Error loading emotion model: {e}")
|
40 |
st.stop()
|
|
|
5 |
import sqlite3
|
6 |
import cv2
|
7 |
import numpy as np
|
8 |
+
from tensorflow.keras.models import load_model # Importing load_model
|
9 |
|
10 |
# Constants
|
11 |
HOME_DIR = os.getcwd() # Home directory to save images (root directory)
|
|
|
35 |
|
36 |
# Load the emotion detection model
|
37 |
try:
|
38 |
+
emotion_model = load_model(EMOTION_MODEL_FILE) # Load the emotion model
|
39 |
except Exception as e:
|
40 |
st.error(f"Error loading emotion model: {e}")
|
41 |
st.stop()
|