File size: 2,025 Bytes
aff9f53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import pandas as pd

# new_data = pd.DataFrame({
#     'gender':0,
#     'ssc_p':55.0,
#     'ssc_b':0,
#     'hsc_p':75.0,
#     'hsc_b':0,
#     'hsc_s':1,
#     'degree_p':65.0,
#     'degree_t':2,
#     'workex':0,
#     'etest_p':55.0,
#      'specialisation':1,
#     'mba_p':58.8,
# },index=[0])

import joblib

model = joblib.load('model_campus_placement')

# p=model.predict(new_data)
# prob=model.predict_proba(new_data)

# if p[0]==1:
#     print('Placed')
#     print(f"You will be placed with probability of {prob[0][1]:.2f}")
# else:
#     print("Not-placed")

import streamlit as st

st.title('Campus-Placement-Prediction-Using-Machine-Learning')

gender=st.number_input('gender',value=0)
ssc_p=st.number_input('ssc_p',value=0)
ssc_b=st.number_input('ssc_b',value=0)
hsc_p=st.number_input('hsc_p',value=0)
hsc_b=st.number_input('hsc_b',value=0)
hsc_s=st.number_input('hsc_s',value=0)
degree_p=st.number_input('degree_p',value=0)
degree_t=st.number_input('degree_t',value=0)
workex=st.number_input('workex',value=0)
etest_p=st.number_input('etest_p',value=0)
specialisation=st.number_input('specialisation',value=0)
mba_p=st.number_input('mba_p',value=0)

if st.button('submit'):

    new_data = pd.DataFrame({
        'gender':gender,
        'ssc_p':ssc_p,
        'ssc_b':ssc_b,
        'hsc_p':hsc_p,
        'hsc_b':hsc_b,
        'hsc_s':hsc_s,
        'degree_p':degree_p,
        'degree_t':degree_t,
        'workex':workex,
        'etest_p':etest_p,
        'specialisation':specialisation,
        'mba_p':mba_p,
    },index=[0])

    p=model.predict(new_data)
    prob=model.predict_proba(new_data)

    
    if p[0]==1:
        # print('Placed')
        st.write('Placed')
        # print(f"You will be placed with probability of {prob[0][1]:.2f}")
        st.write(f"You will be placed with probability of {prob[0][1]:.2f}")

    else:
        # print("Not-placed")
        st.write('Not-placed')