Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,10 @@ if st.button("Predict Sentiment"):
|
|
14 |
if user_input:
|
15 |
sentiment = predict(user_input)
|
16 |
if sentiment == 1 :
|
|
|
|
|
17 |
sentiment = 'Positive'
|
18 |
-
|
19 |
sentiment = 'Negative'
|
20 |
# Menambahkan hasil prediksi ke list
|
21 |
st.write(f"The sentiment of the tweet is: **{sentiment}**")
|
|
|
14 |
if user_input:
|
15 |
sentiment = predict(user_input)
|
16 |
if sentiment == 1 :
|
17 |
+
sentiment = 'Neutral'
|
18 |
+
elif sentiment == 2 :
|
19 |
sentiment = 'Positive'
|
20 |
+
elif sentiment == 0 :
|
21 |
sentiment = 'Negative'
|
22 |
# Menambahkan hasil prediksi ke list
|
23 |
st.write(f"The sentiment of the tweet is: **{sentiment}**")
|