NimaKL commited on
Commit
4860c7a
Β·
1 Parent(s): c353614

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -65,7 +65,8 @@ def predict(new_sentence):
65
  output = model(test_ids.to(device), token_type_ids = None, attention_mask = test_attention_mask.to(device))
66
 
67
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
68
- st.header('Predicted Class: ', prediction)
 
69
 
70
  #st.write('Input', namestr(new_sentence, globals()),': \n', new_sentence)
71
  # Remove the namestr(new_sentence, globals()) in case of an error
 
65
  output = model(test_ids.to(device), token_type_ids = None, attention_mask = test_attention_mask.to(device))
66
 
67
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
68
+ pred = 'Predicted Class: '+ prediction
69
+ st.header(pred)
70
 
71
  #st.write('Input', namestr(new_sentence, globals()),': \n', new_sentence)
72
  # Remove the namestr(new_sentence, globals()) in case of an error