2 / app.py
eijaz's picture
Update app.py
db49b28 verified
raw
history blame contribute delete
No virus
433 Bytes
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