eijaz commited on
Commit
2e0a821
1 Parent(s): 645f308

Upload 3 files

Browse files
Files changed (3) hide show
  1. app.py +24 -0
  2. stress.h5 +3 -0
  3. stress_model.h5 +3 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ import pandas as pd
4
+ import joblib
5
+
6
+ st.title("Stress Model")
7
+
8
+ data = pd.read_excel("C:/Users/eijaz/OneDrive/Desktop/stress_data.xlsx")
9
+
10
+ posts = st.text_area("Enter your concern")
11
+
12
+ if st.button("Predict"):
13
+ vector = joblib.load("stress.h5")
14
+
15
+ predictions = vector.transform([posts])
16
+
17
+ model = joblib.load("stress_model.h5")
18
+
19
+ pred = model.predict(predictions)
20
+
21
+ st.success(pred)
22
+
23
+ # We need not use conditional statements as its in labels and we didn;t encode it
24
+
stress.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bbbc21fdb3fa8b5ac75f01813e3703684c4d54d95fda8a7c0d68240c8d62868
3
+ size 205301
stress_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abdd41ae2bd67af912b559e90e06675bccabf4d0739c19e0b942d5f80513b304
3
+ size 986870