kanneboinakumar commited on
Commit
673a669
·
verified ·
1 Parent(s): 9b40f13

Upload 4 files

Browse files
Files changed (4) hide show
  1. ANN_model.pth +3 -0
  2. app.py +51 -0
  3. placementdata.csv +0 -0
  4. requirements.txt +6 -0
ANN_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0acee37b4db5459a3389bdbf7c72db2a886894142d743f83394f01dec0c79c2b
3
+ size 5212
app.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import numpy as np
3
+ import torch
4
+ import torch.nn as nn
5
+ import torch.nn.functional as F
6
+
7
+ st.title("Placement Analysis")
8
+ # Define the same model architecture
9
+ class ANN_Model(nn.Module):
10
+ def __init__(self, input_cols=10, hidden1=20, hidden2=20, output=1):
11
+ super().__init__()
12
+ self.f_connected1 = nn.Linear(input_cols, hidden1)
13
+ self.f_connected2 = nn.Linear(hidden1, hidden2)
14
+ self.out = nn.Linear(hidden2, output)
15
+
16
+ def forward(self, x):
17
+ x = F.relu(self.f_connected1(x))
18
+ x = F.relu(self.f_connected2(x))
19
+ x = torch.sigmoid(self.out(x)) # Sigmoid for binary classification
20
+ return x
21
+
22
+ # Load the model
23
+ model = ANN_Model() # Initialize the model
24
+ model.load_state_dict(torch.load("ANN_model.pth")) # Load saved weights
25
+ model.eval() # Set to evaluation mode
26
+
27
+ cgpa = st.number_input("Enter your CGPA", min_value=0.0, max_value=10.0, step=0.01)
28
+ internships = st.number_input("Number of Internships", min_value=0, max_value=10, step=1)
29
+ projects = st.number_input("Number of Projects", min_value=0, max_value=20, step=1)
30
+ certifications = st.selectbox("Do you have certifications?", ["Yes", "No"])
31
+ certifications = 1 if certifications =="Yes" else 0
32
+ AptitudeTestScore = st.number_input("Aptitude Test Score", min_value=0, max_value=100, step=1)
33
+ SoftSkillsRating = st.number_input("Soft Skills Rating",min_value=0,max_value=5)
34
+ ExtracurricularActivities = st.selectbox("Extracurricular Activities",["Yes","No"])
35
+ ExtracurricularActivities = 1 if ExtracurricularActivities=="Yes" else 0
36
+ PlacementTraining = st.selectbox("Placement Training",["Yes","No"])
37
+ PlacementTraining = 1 if PlacementTraining=="Yes" else 0
38
+ SSC_Marks = st.number_input("SSC Marks", min_value=0, max_value=100, step=1)
39
+ HSC_Marks = st.number_input("HSC Marks", min_value=0, max_value=100, step=1)
40
+ # Predict Button
41
+ if st.button("Predict Placement"):
42
+ # Prepare input for model
43
+ input_data = [cgpa, internships, projects,certifications,AptitudeTestScore,SoftSkillsRating,
44
+ ExtracurricularActivities,PlacementTraining,SSC_Marks,HSC_Marks ]
45
+ # # Example: Making a prediction
46
+ with torch.no_grad():
47
+ output = model(torch.tensor(input_data)).numpy()
48
+ if output >= 0.5:
49
+ st.success("🎉 Congratulations! You are likely to get placed.")
50
+ else:
51
+ st.error("⚠️ You might need to improve your profile for better chances.")
placementdata.csv ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ joblib==1.4.2
2
+ numpy==2.2.1
3
+ pandas==2.2.3
4
+ scikit-learn==1.6.1
5
+ streamlit==1.41.1
6
+ torch == 2.5.1