NimaKL commited on
Commit
3a5ff68
Β·
1 Parent(s): bc1ac23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -51,12 +51,12 @@ def preprocessing(input_text, tokenizer):
51
  output = model(test_ids.to(device), token_type_ids = None, attention_mask = test_attention_mask.to(device))
52
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
53
  pred = 'Predicted Class: '+ prediction
54
- return pred
55
- if text or aButton:
56
- st.text_input("Enter the text you'd like to analyze for spam.")
57
- st.button('Analyze')
58
- with col2:
59
- st.header(predict(text))
60
 
61
 
62
 
 
51
  output = model(test_ids.to(device), token_type_ids = None, attention_mask = test_attention_mask.to(device))
52
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
53
  pred = 'Predicted Class: '+ prediction
54
+ return pred
55
+ if text or aButton:
56
+ st.text_input("Enter the text you'd like to analyze for spam.")
57
+ st.button('Analyze')
58
+ with col2:
59
+ st.header(predict(text))
60
 
61
 
62