Update app.py
Browse files
app.py
CHANGED
@@ -16,11 +16,15 @@ com.iframe("https://embed.lottiefiles.com/animation/149093")
|
|
16 |
st.markdown("<h1 style='text-align: center'> Tweet Sentiments </h1>",unsafe_allow_html=True)
|
17 |
|
18 |
#Create a form to take user inputs
|
19 |
-
with st.form(key='tweet',clear_on_submit=
|
20 |
text=st.text_area('Copy and paste a tweet or type one',placeholder='I find it quite amusing how people ignore the effects of not taking the vaccine')
|
21 |
submit=st.form_submit_button('submit')
|
22 |
if submit:
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
#Select a model
|
25 |
exp=st.expander(label='Choose a model and Click Continue or go ahead and Click continue to use default')
|
26 |
models={'Roberta': 'Junr-syl/sentiments_analysis_Roberta',
|
|
|
16 |
st.markdown("<h1 style='text-align: center'> Tweet Sentiments </h1>",unsafe_allow_html=True)
|
17 |
|
18 |
#Create a form to take user inputs
|
19 |
+
with st.form(key='tweet',clear_on_submit=False):
|
20 |
text=st.text_area('Copy and paste a tweet or type one',placeholder='I find it quite amusing how people ignore the effects of not taking the vaccine')
|
21 |
submit=st.form_submit_button('submit')
|
22 |
if submit:
|
23 |
+
#Check text
|
24 |
+
if text="":
|
25 |
+
st.error('Empty text')
|
26 |
+
else:
|
27 |
+
st.success('Text received',icon='✅')
|
28 |
#Select a model
|
29 |
exp=st.expander(label='Choose a model and Click Continue or go ahead and Click continue to use default')
|
30 |
models={'Roberta': 'Junr-syl/sentiments_analysis_Roberta',
|