NavyaNayer commited on
Commit
2f5430d
·
verified ·
1 Parent(s): 3e6fdc5

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. 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
- emotions_model_path = "./saved_model"
 
 
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()