-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
31 lines (22 loc) · 734 Bytes
/
app.py
File metadata and controls
31 lines (22 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import pandas as pd
import streamlit as st
import numpy as np
import pickle
import warnings
warnings.filterwarnings("ignore")
from absenteeism_module import *
def Input_Output():
data = st.file_uploader("Please Upload Your File Here", type={"csv", "txt"})
if data is not None:
df = pd.read_csv(data)
st.write(df)
model = absenteeism_model('model', 'scaler')
model.load_and_clean_data('Absenteeism_new_data.csv')
result = ""
if st.button("Click here to Predict"):
result = model.predicted_outputs()
st.balloons()
st.success('The output is as follows: ')
st.write(result)
if __name__ == '__main__':
Input_Output()