Update app.py
Browse files
app.py
CHANGED
|
@@ -6,12 +6,13 @@ st.set_page_config(layout='wide', initial_sidebar_state='expanded')
|
|
| 6 |
col1, col2= st.columns(2)
|
| 7 |
placeholder = st.empty()
|
| 8 |
placeholder2 = st.empty()
|
| 9 |
-
with col1:
|
| 10 |
-
st.title("Spamd: Turkish Spam Detector")
|
| 11 |
-
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.")
|
| 12 |
with col2:
|
| 13 |
text = placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=True, key="1")
|
| 14 |
aButton = placeholder2.button('Analyze', disabled=True, key="1")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
if st.button('Load Model', disabled=False):
|
| 16 |
with st.spinner('Wait for it...'):
|
| 17 |
import torch
|
|
@@ -61,6 +62,8 @@ if st.button('Load Model', disabled=False):
|
|
| 61 |
placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=False, key="2")
|
| 62 |
placeholder2.button('Analyze', disabled=False, key="2")
|
| 63 |
if text or aButton:
|
|
|
|
|
|
|
| 64 |
with col2:
|
| 65 |
st.header(predict(text))
|
| 66 |
|
|
|
|
| 6 |
col1, col2= st.columns(2)
|
| 7 |
placeholder = st.empty()
|
| 8 |
placeholder2 = st.empty()
|
|
|
|
|
|
|
|
|
|
| 9 |
with col2:
|
| 10 |
text = placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=True, key="1")
|
| 11 |
aButton = placeholder2.button('Analyze', disabled=True, key="1")
|
| 12 |
+
with col1:
|
| 13 |
+
st.title("Spamd: Turkish Spam Detector")
|
| 14 |
+
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.")
|
| 15 |
+
|
| 16 |
if st.button('Load Model', disabled=False):
|
| 17 |
with st.spinner('Wait for it...'):
|
| 18 |
import torch
|
|
|
|
| 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 |
|