Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -1
src/streamlit_app.py
CHANGED
|
@@ -33,7 +33,9 @@ intent_tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
|
|
| 33 |
intent_model.to(device).eval()
|
| 34 |
|
| 35 |
# Load Emotion Model
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
emotions_model = DistilBertForSequenceClassification.from_pretrained(emotions_model_path)
|
| 38 |
emotions_tokenizer = DistilBertTokenizer.from_pretrained(emotions_model_path)
|
| 39 |
emotions_model.to(device).eval()
|
|
|
|
| 33 |
intent_model.to(device).eval()
|
| 34 |
|
| 35 |
# Load Emotion Model
|
| 36 |
+
|
| 37 |
+
emotions_model_path = os.path.join(os.path.dirname(__file__), "saved_model")
|
| 38 |
+
|
| 39 |
emotions_model = DistilBertForSequenceClassification.from_pretrained(emotions_model_path)
|
| 40 |
emotions_tokenizer = DistilBertTokenizer.from_pretrained(emotions_model_path)
|
| 41 |
emotions_model.to(device).eval()
|