Update main.py
Browse files
main.py
CHANGED
@@ -32,7 +32,7 @@ def get():
|
|
32 |
def predict():
|
33 |
message = "This is good movies" #request.form['message']
|
34 |
# choice of the model
|
35 |
-
results = get_prediction(message, dictOfModels['
|
36 |
print(f'User selected model : {request.form.get("model_choice")}')
|
37 |
my_prediction = f'The feeling of this text is {results[0]["label"]} with probability of {results[0]["score"]*100}%.'
|
38 |
return render_template('result.html', text = f'{message}', prediction = my_prediction)
|
|
|
32 |
def predict():
|
33 |
message = "This is good movies" #request.form['message']
|
34 |
# choice of the model
|
35 |
+
results = get_prediction(message, dictOfModels['BERT']) # get_prediction(message, dictOfModels['request.form.get("model_choice")'])
|
36 |
print(f'User selected model : {request.form.get("model_choice")}')
|
37 |
my_prediction = f'The feeling of this text is {results[0]["label"]} with probability of {results[0]["score"]*100}%.'
|
38 |
return render_template('result.html', text = f'{message}', prediction = my_prediction)
|