Greg Thompson commited on
Commit
db53e78
1 Parent(s): df02413

Adjust the threshold for sentiment analysis

Browse files
Files changed (1) hide show
  1. mathtext_fastapi/nlu.py +1 -1
mathtext_fastapi/nlu.py CHANGED
@@ -157,7 +157,7 @@ def evaluate_message_with_nlu(message_data):
157
  if number_api_resp == 32202:
158
  # Run intent classification with logistic regression model
159
  predicted_label = predict_message_intent(message_text)
160
- if predicted_label['confidence'] > 0.05:
161
  nlu_response = predicted_label
162
  else:
163
  # Run sentiment analysis
 
157
  if number_api_resp == 32202:
158
  # Run intent classification with logistic regression model
159
  predicted_label = predict_message_intent(message_text)
160
+ if predicted_label['confidence'] > 0.01:
161
  nlu_response = predicted_label
162
  else:
163
  # Run sentiment analysis