File size: 433 Bytes
2e0a821 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
import pandas as pd
import joblib
st.title("Stress Model")
posts = st.text_area("Enter your concern")
if st.button("Predict"):
vector = joblib.load("stress.h5")
predictions = vector.transform([posts])
model = joblib.load("stress_model.h5")
pred = model.predict(predictions)
st.success(pred)
# We need not use conditional statements as its in labels and we didn;t encode it
|