|
import pandas as pd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import joblib
|
|
|
|
model = joblib.load('model_campus_placement')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
st.write('Placed')
|
|
|
|
st.write(f"You will be placed with probability of {prob[0][1]:.2f}")
|
|
|
|
else:
|
|
|
|
st.write('Not-placed')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|