Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollopy-tulane committed Apr 29, 2024
1 parent 8cb5af0 commit 54d16ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nlp/app/routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from flask import render_template, flash, redirect, session
from tensorflow.keras.models import load_model
import numpy as np
from . import app
from .forms import MyForm
from .. import bnb_path, lr_path, cnn_path
Expand Down Expand Up @@ -46,7 +47,7 @@ def index():
text = basic_process(input_field)
text = cnn_process(text)
predictions_proba = model.predict(text)
pred = (predictions_proba > 0.5).astype(int)
pred = np.argmax(predictions_proba)
proba = predictions_proba[0]
elif model_choice == 'bert':
tokenizer = BertTokenizerFast.from_pretrained('prajjwal1/bert-mini')
Expand Down

0 comments on commit 54d16ba

Please sign in to comment.