File size: 4,260 Bytes
9c693e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36c0a72
9c693e1
36c0a72
9c693e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0df078e
9c693e1
 
 
0df078e
9c693e1
 
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import streamlit as st
import numpy as np
import pickle
import streamlit.components.v1 as components

# Load the pickled model
def load_model():
    return pickle.load(open('Employee_Turnover_prognosis_RandomForest.pkl', 'rb'))

# Function for model prediction
def model_prediction(model, features):
    predicted = str(model.predict(features)[0])
    return predicted

def app_design():
    # Add input fields for High, Open, and Low values
    image = '14.png'
    st.image(image, use_column_width=True)
    
    st.subheader("Enter the following values:")

    
    Stag = st.number_input("Stag")
    Gender = st.selectbox('Gender',('Male','Female'))
    if Gender == 'Male':
          Gender = 1
    elif Gender == 'Female':
          Gender = 0      
    Age = st.number_input("Age")
    Industry = st.number_input("Industry")
    Profession = st.number_input("Profession")
    Traffic = st.number_input("Traffic")
    Coach = st.number_input("Coach")
    Head_gender = st.select_slider("Head Gender",('Male','Female'))
    if Head_gender == 'Male':
          Head_gender = 0
    elif Head_gender == 'Female':
          Head_gender = 1  
    Greywage = st.number_input("Greywage")
    Way = st.number_input("Way")
    Extraversion = st.number_input("Extraversion")
    Independ = st.number_input("Independ")
    Selfcontrol = st.number_input("Selfcontrol")
    Anxiety = st.number_input("Anxiety")
    Novator = st.number_input("Novator")
    
 
    # Create a feature list from the user inputs
    features = [Stag,Gender,Age,Industry,Profession,Traffic,Coach,Head_gender,Greywage,Way,Extraversion,Independ,Selfcontrol,Anxiety,Novator]
    
    # Load the model
    model = load_model()
    
    # Make a prediction when the user clicks the "Predict" button
    if st.button('Predict Turnover'):
        predicted_value = model_prediction(model, features)
        st.success(f"The Employee Turnover is: {predicted_value}")       


def about_hidevs():

        components.html("""
        <div>
        <h4>🚀 Unlock Your Dream Job with HiDevs Community!</h4>
        <p class="subtitle">🔍 Seeking the perfect job? HiDevs Community is your gateway to career success in the tech industry. Explore free expert courses, job-seeking support, and career transformation tips.</p>
        <p class="subtitle">💼 We offer an upskill program in <b>Gen AI, Data Science, Machine Learning</b>, and assist startups in adopting <b>Gen AI</b> at minimal development costs.</p>
        <p class="subtitle">🆓 Best of all, everything we offer is <b>completely free</b>! We are dedicated to helping society.</p>
        <p class="subtitle">Book free of cost 1:1 mentorship on any topic of your choice — <a class="link" href="https://topmate.io/deepakchawla1307">topmate</a></p>
        <p class="subtitle">✨ We dedicate over 30 minutes to each applicant’s resume, LinkedIn profile, mock interview, and upskill program. If you’d like our guidance, check out our services <a class="link" href="https://hidevscommunity.wixsite.com/hidevs">here</a></p>
        <p class="subtitle">💡 Join us now, and turbocharge your career!</p>
        <p class="subtitle"><a class="link" href="https://hidevscommunity.wixsite.com/hidevs" target="__blank">Website</a>
        <a class="link" href="https://www.youtube.com/@HidevsCommunity1307/" target="__blank">YouTube</a>
        <a class="link" href="https://www.instagram.com/hidevs_community/" target="__blank">Instagram</a>
        <a class="link" href="https://medium.com/@hidevscommunity" target="__blank">Medium</a>
        <a class="link" href="https://www.linkedin.com/company/hidevs-community/" target="__blank">LinkedIn</a>
        <a class="link" href="https://github.com/hidevscommunity" target="__blank">GitHub</a></p>
      </div>
        """,
                    height=600)

def main():

        # Set the app title and add your website name and logo
        st.set_page_config(
        page_title="Employee Turnover Prediction",
        page_icon=":chart_with_upwards_trend:",
        )
    
        st.title("Welcome to our Employee Turnover Prediction App!")
    
        app_design()    
        st.header("About HiDevs Community")
        about_hidevs()

if __name__ == '__main__':
        main()