NimaKL commited on
Commit
023198d
Β·
1 Parent(s): 258845d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -53,7 +53,8 @@ if st.button('Load Model', disabled=False):
53
  with torch.no_grad():
54
  output = model(test_ids.to(device), token_type_ids = None, attention_mask = test_attention_mask.to(device))
55
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
56
- return pred = 'Predicted Class: '+ prediction
 
57
  with col2:
58
  text = st.text_input("Enter the text you'd like to analyze for spam.")
59
  if text or st.button('Analyze'):
 
53
  with torch.no_grad():
54
  output = model(test_ids.to(device), token_type_ids = None, attention_mask = test_attention_mask.to(device))
55
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
56
+ pred = 'Predicted Class: '+ prediction
57
+ return pred
58
  with col2:
59
  text = st.text_input("Enter the text you'd like to analyze for spam.")
60
  if text or st.button('Analyze'):