From 8bf4edb67bdb06d638b85ba3170e2bb08c621f52 Mon Sep 17 00:00:00 2001 From: jcollopy-tulane Date: Mon, 29 Apr 2024 18:37:51 -0500 Subject: [PATCH] Index --- nlp/app/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nlp/app/routes.py b/nlp/app/routes.py index 1254e1a..7dd895f 100644 --- a/nlp/app/routes.py +++ b/nlp/app/routes.py @@ -43,7 +43,7 @@ def index(): text = basic_process(input_field) text = cnn_process(text) predictions_proba = cnn.predict(text) - pred = (predictions_proba > 0.5).astype(int)[0] # Assuming binary classification + pred = (predictions_proba > 0.5).astype(int) proba = predictions_proba[0] elif model_choice == 'bert': tokenizer = BertTokenizerFast.from_pretrained('prajjwal1/bert-mini')