Update app.py
Browse files
app.py
CHANGED
@@ -9,12 +9,6 @@ with col1:
|
|
9 |
st.title("Spamd: Turkish Spam Detector")
|
10 |
st.markdown("Message spam detection tool for Turkish language. Due the small size of the dataset, I decided to go with transformers technology Google BERT. Using the Turkish pre-trained model BERTurk, I imporved the accuracy of the tool by 18 percent compared to the previous model which used fastText.")
|
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 |
|
@@ -78,3 +72,9 @@ def predict(new_sentence):
|
|
78 |
|
79 |
#st.write('Input', namestr(new_sentence, globals()),': \n', new_sentence)
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
st.title("Spamd: Turkish Spam Detector")
|
10 |
st.markdown("Message spam detection tool for Turkish language. Due the small size of the dataset, I decided to go with transformers technology Google BERT. Using the Turkish pre-trained model BERTurk, I imporved the accuracy of the tool by 18 percent compared to the previous model which used fastText.")
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
|
14 |
|
|
|
72 |
|
73 |
#st.write('Input', namestr(new_sentence, globals()),': \n', new_sentence)
|
74 |
|
75 |
+
with col2:
|
76 |
+
text = st.text_input("Enter the text you'd like to analyze for spam.")
|
77 |
+
if text:
|
78 |
+
predict(text)
|
79 |
+
if st.button('Analyze'):
|
80 |
+
predict(text)
|