Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,8 +53,8 @@ def get_embeddings(text, model_type="bert"):
|
|
| 53 |
embeddings = outputs.last_hidden_state[:, 0, :].detach().numpy() # Get the embeddings for [CLS] token
|
| 54 |
return embeddings
|
| 55 |
|
| 56 |
-
|
| 57 |
-
path_to_models = os.environ['RAILWAY_VOLUME_MOUNT_PATH']+"/storage"
|
| 58 |
emotion_classifier_map={
|
| 59 |
"Naive Bayes":f"{path_to_models}/models/naive_bayes_model.sav",
|
| 60 |
"Logistic Regression":f"{path_to_models}/models/logistic_regression_model.sav",
|
|
|
|
| 53 |
embeddings = outputs.last_hidden_state[:, 0, :].detach().numpy() # Get the embeddings for [CLS] token
|
| 54 |
return embeddings
|
| 55 |
|
| 56 |
+
path_to_models = "."
|
| 57 |
+
# path_to_models = os.environ['RAILWAY_VOLUME_MOUNT_PATH']+"/storage"
|
| 58 |
emotion_classifier_map={
|
| 59 |
"Naive Bayes":f"{path_to_models}/models/naive_bayes_model.sav",
|
| 60 |
"Logistic Regression":f"{path_to_models}/models/logistic_regression_model.sav",
|