NimaKL commited on
Commit
f201997
Β·
1 Parent(s): 7fa544b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -59,13 +59,14 @@ if st.button('Load Model', disabled=False):
59
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
60
  pred = 'Predicted Class: '+ prediction
61
  return pred
62
- placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=False, key="2")
63
- placeholder2.button('Analyze', disabled=False, key="2")
64
- if text or aButton:
65
- placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=False, key="3")
66
- placeholder2.button('Analyze', disabled=False, key="3")
67
- with col2:
68
- st.header(predict(text))
 
69
 
70
 
71
 
 
59
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
60
  pred = 'Predicted Class: '+ prediction
61
  return pred
62
+ with col2:
63
+ placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=False, key="2")
64
+ placeholder2.button('Analyze', disabled=False, key="2")
65
+ if text or aButton:
66
+ placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=False, key="3")
67
+ placeholder2.button('Analyze', disabled=False, key="3")
68
+ with col2:
69
+ st.header(predict(text))
70
 
71
 
72