Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,13 @@ import numpy as np
|
|
9 |
emotion_model = load_model('lstm_model.h5')
|
10 |
|
11 |
# Load the KNN recommender model
|
12 |
-
recommender_model = joblib.load('knn_model.pkl')
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# Load the tokenizer (ensure it's the one used during training)
|
15 |
# tokenizer = joblib.load('tokenizer.pkl') # Update this to the correct path
|
|
|
9 |
emotion_model = load_model('lstm_model.h5')
|
10 |
|
11 |
# Load the KNN recommender model
|
12 |
+
#recommender_model = joblib.load('knn_model.pkl')
|
13 |
+
|
14 |
+
# Load the KNN recommender model
|
15 |
+
try:
|
16 |
+
recommender_model = joblib.load('knn_model.pkl')
|
17 |
+
except Exception as e:
|
18 |
+
st.error(f"Error loading model: {e}")
|
19 |
|
20 |
# Load the tokenizer (ensure it's the one used during training)
|
21 |
# tokenizer = joblib.load('tokenizer.pkl') # Update this to the correct path
|