Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +1 -1
src/streamlit_app.py
CHANGED
@@ -25,7 +25,7 @@ client = Together(api_key=os.getenv("TOGETHER_API_KEY", ""))
|
|
25 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
26 |
|
27 |
# Load Intent Model
|
28 |
-
intent_model_path = "intent_classifier.pth"
|
29 |
num_intent_labels = 151
|
30 |
intent_model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=num_intent_labels)
|
31 |
intent_model.load_state_dict(torch.load(intent_model_path, map_location=device))
|
|
|
25 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
26 |
|
27 |
# Load Intent Model
|
28 |
+
intent_model_path = os.path.join(os.path.dirname(__file__), "intent_classifier.pth")
|
29 |
num_intent_labels = 151
|
30 |
intent_model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=num_intent_labels)
|
31 |
intent_model.load_state_dict(torch.load(intent_model_path, map_location=device))
|