Update app.py
Browse files
app.py
CHANGED
@@ -13,16 +13,22 @@ st.set_page_config(page_title='Sentiments Analysis',page_icon='π',layout='cen
|
|
13 |
|
14 |
#welcome Animation
|
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=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.
|
|
|
26 |
else:
|
27 |
st.success('Text received',icon='β
')
|
28 |
#Select a model
|
|
|
13 |
|
14 |
#welcome Animation
|
15 |
com.iframe("https://embed.lottiefiles.com/animation/149093")
|
16 |
+
st.markdown("<h1 style='text-align: center'> Covid Vaccine Tweet Sentiments </h1>",unsafe_allow_html=True)
|
17 |
+
st.markdown("<h2 style='text-align: center'> These models were trained to detect how a user feel about the covid vaccines based on their tweets(text) </h2>",unsafe_allow_html=True)
|
18 |
|
19 |
#Create a form to take user inputs
|
20 |
with st.form(key='tweet',clear_on_submit=False):
|
21 |
+
#input text
|
22 |
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')
|
23 |
+
#Set examples
|
24 |
+
alt_text=st.selectbox("'Can't Type? Select an Example below",('I hate the vaccines','Vaccines made from dead human tissues','Take the vaccines or regret the consequences','Covid is a Hoax','Making the vaccines is a huge step forward for humanity. Just take them'))
|
25 |
+
#Submit
|
26 |
submit=st.form_submit_button('submit')
|
27 |
if submit:
|
28 |
#Check text
|
29 |
if text=="":
|
30 |
+
st.write(f'input text is set to {alt_text}')
|
31 |
+
text=alt_text
|
32 |
else:
|
33 |
st.success('Text received',icon='β
')
|
34 |
#Select a model
|