Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,14 @@ if st.button("Predict"):
|
|
| 19 |
|
| 20 |
pred = model.predict(predictions)
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# We need not use conditional statements as its in labels and we didn;t encode it
|
| 25 |
|
|
|
|
| 19 |
|
| 20 |
pred = model.predict(predictions)
|
| 21 |
|
| 22 |
+
if pred[0]=="Financial Stress":
|
| 23 |
+
st.success("This Posts suggests that person has Financial Stress.")
|
| 24 |
+
elif pred[0]=="Health Stress":
|
| 25 |
+
st.success("This Posts suggests that person has Health Stress.")
|
| 26 |
+
elif pred[0] == "Other Stress":
|
| 27 |
+
st.success("This Posts suggests that person has Other Type Of Stress.")
|
| 28 |
+
elif pred[0] =="Work Stress":
|
| 29 |
+
st.success("This Posts suggests that person has Work Stress")
|
| 30 |
|
| 31 |
# We need not use conditional statements as its in labels and we didn;t encode it
|
| 32 |
|