Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ class BetterAttention(Layer):
|
|
| 20 |
return (context_vector, attention_weights) if self.return_attention else context_vector
|
| 21 |
|
| 22 |
# 🔸 Load model & tokenizer
|
| 23 |
-
model = tf.keras.models.load_model("
|
| 24 |
tokenizer = joblib.load("tokenizer.joblib")
|
| 25 |
|
| 26 |
# 🔸 Define prediction
|
|
|
|
| 20 |
return (context_vector, attention_weights) if self.return_attention else context_vector
|
| 21 |
|
| 22 |
# 🔸 Load model & tokenizer
|
| 23 |
+
model = tf.keras.models.load_model("sentiment_model.keras", custom_objects={"BetterAttention": BetterAttention})
|
| 24 |
tokenizer = joblib.load("tokenizer.joblib")
|
| 25 |
|
| 26 |
# 🔸 Define prediction
|