import streamlit as st import numpy as np import joblib #load the training the model model=joblib.load("./models/models.pkl") st.set_page_config(page_title="🎓Student Placement Prediction System",page_icon="🎓",layout="wide") #tit st.markdown("

🎓Student Placement Prediction System

",unsafe_allow_html=True) st.markdown("---") st.sidebar.header("Student Details") gender=st.selectbox("Gender",["Male","Female"]) tenth_board=st.selectbox("10th Board",["CBSE","Diploma","ICSE","ISE","Other state Board","State Board","WBBSE"]) tenth_marks=st.number_input("10th marks") twelfth_board=st.selectbox("12th Board",["CBSE","Diploma","ISE","Other state Board","State Board","WBCHSE"]) twelfth_marks=st.number_input("12th marks") stream=st.selectbox("Stream",["Civil Engineering","Computer Science and Engineering","Computer Science in AIML","Electronics and Communication Engineering","Information Technology","Mechanical Engineering","Production Engineering"]) cgpa=st.number_input("Cgpa") internship=st.selectbox("Internships(Y/N)",["Yes","No"]) training=st.selectbox("Training(Y/N)",["Yes","No"]) backlog=st.number_input("Backlog in 5th sem") innovative_project=st.selectbox("Innovative Project(Y/N)",["Yes","No"]) communication=st.slider("Communication Skills",0,5) Course=st.selectbox("Technical Course(Y/N)",["Yes","No"]) st.markdown("📑Students Inputs Summary") col1,col2,col3=st.columns(3) col1.metric("10th Marks",tenth_marks) col2.metric("12th Marks",twelfth_marks) col3.metric("CGPA",cgpa) st.markdown("---") if st.button("Predict Placement"): gender=1 if gender=="Male" else 0 tenth_board_encoded=["CBSE","Diploma","ICSE","ISE","Other state Board","State Board","WBBSE"].index(tenth_board) twelfth_board_encoded=["CBSE","Diploma","ISE","Other state Board","State Board","WBCHSE"].index(twelfth_board) stream_encoded=["Civil Engineering","Computer Science and Engineering","Computer Science in AIML","Electronics and Communication Engineering","Information Technology","Mechanical Engineering","Production Engineering"].index(stream) internship=1 if internship=="Yes" else 0 training=1 if training=="Yes" else 0 backlog=1 if backlog>0 else 0 innovative_project=1 if innovative_project=="Yes" else 0 courses=1 if Course=="Yes" else 0 input_data=np.array([[gender,tenth_board_encoded,tenth_marks,twelfth_board_encoded,twelfth_marks,stream_encoded,cgpa,internship,training,backlog,innovative_project,communication,courses]]) prediction=model.predict(input_data) if prediction[0]==1: st.success("🎉🎉Student will be placed") st.balloons() else: st.error("❌😒Student will not be placed") st.snow()