NimaKL commited on
Commit
7ce7c66
Β·
1 Parent(s): 7fb9647

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -11,7 +11,10 @@ with col1:
11
 
12
  with col2:
13
  text = st.text_input("Enter the text you'd like to analyze for spam.")
14
-
 
 
 
15
 
16
 
17
 
@@ -74,6 +77,4 @@ def predict(new_sentence):
74
  st.header(pred)
75
 
76
  #st.write('Input', namestr(new_sentence, globals()),': \n', new_sentence)
77
- # Remove the namestr(new_sentence, globals()) in case of an error
78
- if st.button('Analyze'):
79
- predict(text)
 
11
 
12
  with col2:
13
  text = st.text_input("Enter the text you'd like to analyze for spam.")
14
+ if text:
15
+ predict(text)
16
+ if st.button('Analyze'):
17
+ predict(text)
18
 
19
 
20
 
 
77
  st.header(pred)
78
 
79
  #st.write('Input', namestr(new_sentence, globals()),': \n', new_sentence)
80
+