The-Adnan-Syed commited on
Commit
8e8cc51
·
verified ·
1 Parent(s): 701d205

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ import pandas as pd
4
+ import joblib
5
+
6
+ st.title("Stress Model")
7
+
8
+
9
+ posts = st.text_area("Enter your concern")
10
+
11
+ if st.button("Predict"):
12
+ vector = joblib.load("stress.h5")
13
+
14
+ predictions = vector.transform([posts])
15
+
16
+ model = joblib.load("stress_model.h5")
17
+
18
+ pred = model.predict(predictions)
19
+
20
+ st.success(pred)
21
+
22
+ # We need not use conditional statements as its in labels and we didn;t encode it
23
+