NimaKL commited on
Commit
c75a57b
Β·
1 Parent(s): 872fed1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -11,7 +11,7 @@ with col1:
11
 
12
  with col2:
13
  st.title("Model:")
14
- if st.button('Load Model'):
15
  with st.spinner('Wait for it...'):
16
 
17
  import torch
@@ -65,11 +65,10 @@ with col2:
65
 
66
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
67
  pred = 'Predicted Class: '+ prediction
68
- with col2:
69
- st.header(pred)
70
- text = st.text_input("Enter the text you'd like to analyze for spam.")
71
- if text or st.button('Analyze'):
72
- predict(text)
73
 
74
 
75
 
 
11
 
12
  with col2:
13
  st.title("Model:")
14
+ if st.button('Load Model', disabled=False):
15
  with st.spinner('Wait for it...'):
16
 
17
  import torch
 
65
 
66
  prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
67
  pred = 'Predicted Class: '+ prediction
68
+ st.header(pred)
69
+ text = st.text_input("Enter the text you'd like to analyze for spam.")
70
+ if text or st.button('Analyze'):
71
+ predict(text)
 
72
 
73
 
74