Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollopy-tulane committed Apr 29, 2024
1 parent f9d6cec commit ad7791c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion nlp/app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Meta: # Ignoring CSRF security feature.
model_choice = RadioField('Choose Model', choices=[
('bnb', 'Naive Bayes'),
('lr', 'Logistic Regression'),
('cnn', 'CNN')
('cnn', 'CNN'),
('bert', "BERT")
])
submit = SubmitField('Submit')
6 changes: 3 additions & 3 deletions nlp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ def __len__(self):
precision = precision_score(true_labels, predictions)
recall = recall_score(true_labels, predictions)
f1 = f1_score(true_labels, predictions)
print("Precision on Test:", precision)
print("Recall on Test:", recall)
print("F1 Score on Test:", f1)
print("Precision on Test:", round(precision,3))
print("Recall on Test:", round(recall,3))
print("F1 Score on Test:", round(f1,3))

if __name__ == "__main__":
sys.exit(main())

0 comments on commit ad7791c

Please sign in to comment.