Spaces:
Runtime error
Runtime error
Greg Thompson
commited on
Commit
•
9f56df0
1
Parent(s):
0a95b80
Update intent classification model
Browse files
mathtext_fastapi/intent_classification.py
CHANGED
@@ -41,9 +41,10 @@ def retrieve_intent_classification_model():
|
|
41 |
return model
|
42 |
|
43 |
|
|
|
|
|
|
|
44 |
def predict_message_intent(message):
|
45 |
-
encoder = SentenceTransformer('all-MiniLM-L6-v2')
|
46 |
-
model = retrieve_intent_classification_model()
|
47 |
tokenized_utterance = np.array([list(encoder.encode(message))])
|
48 |
predicted_label = model.predict(tokenized_utterance)
|
49 |
predicted_probabilities = model.predict_proba(tokenized_utterance)
|
|
|
41 |
return model
|
42 |
|
43 |
|
44 |
+
encoder = SentenceTransformer('all-MiniLM-L6-v2')
|
45 |
+
model = retrieve_intent_classification_model()
|
46 |
+
|
47 |
def predict_message_intent(message):
|
|
|
|
|
48 |
tokenized_utterance = np.array([list(encoder.encode(message))])
|
49 |
predicted_label = model.predict(tokenized_utterance)
|
50 |
predicted_probabilities = model.predict_proba(tokenized_utterance)
|