Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ 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 |
with col2:
|
12 |
-
text = st.text_input("Enter the text you'd like to analyze for spam.", disabled=flag)
|
13 |
-
aButton = st.button('Analyze', disabled=flag)
|
14 |
if st.button('Load Model', disabled=False):
|
15 |
with st.spinner('Wait for it...'):
|
16 |
import torch
|
@@ -58,8 +58,8 @@ if st.button('Load Model', disabled=False):
|
|
58 |
pred = 'Predicted Class: '+ prediction
|
59 |
return pred
|
60 |
flag = False
|
61 |
-
text = st.text_input("Enter the text you'd like to analyze for spam.", disabled=flag)
|
62 |
-
aButton = st.button('Analyze', disabled=flag)
|
63 |
if not flag:
|
64 |
with col2:
|
65 |
if text or aButton:
|
|
|
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 |
with col2:
|
12 |
+
text = st.text_input("Enter the text you'd like to analyze for spam.", disabled=flag, key="1")
|
13 |
+
aButton = st.button('Analyze', disabled=flag, key="1")
|
14 |
if st.button('Load Model', disabled=False):
|
15 |
with st.spinner('Wait for it...'):
|
16 |
import torch
|
|
|
58 |
pred = 'Predicted Class: '+ prediction
|
59 |
return pred
|
60 |
flag = False
|
61 |
+
text = st.text_input("Enter the text you'd like to analyze for spam.", disabled=flag, key="2")
|
62 |
+
aButton = st.button('Analyze', disabled=flag, key="2")
|
63 |
if not flag:
|
64 |
with col2:
|
65 |
if text or aButton:
|