singhjagpreet commited on
Commit
0be4ca4
1 Parent(s): ac35e21

update index.html and readme

Browse files
Files changed (6) hide show
  1. .gitignore +3 -0
  2. README.md +66 -1
  3. application.py +2 -2
  4. setup.py +2 -1
  5. templates/home.html +0 -111
  6. templates/index.html +136 -1
.gitignore CHANGED
@@ -1 +1,4 @@
1
  venv/
 
 
 
 
1
  venv/
2
+ logs/
3
+ catboost_info/
4
+ src/__pychache__
README.md CHANGED
@@ -1 +1,66 @@
1
- # mlops
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Student Performance Indicator with MLOPs
2
+
3
+ The "Student Performance Indicator with MLOps" project is a machine learning application designed to help educational institutions and educators assess and predict student academic performance. It includes data collection, preprocessing, and the development of machine learning models to forecast student outcomes. The project highlights the implementation of MLOps for Continous integration and Continous deployment (CI/CD) using GitHub Actions for model updates and features a user-friendly web application that offers performance predictions. This end-to-end solution promotes academic success and scalability while being hosted on Azure Cloud. It demonstrates the integration of machine learning and operational excellence in an educational context.
4
+
5
+
6
+ ## Features
7
+
8
+ - Take User Input from the Web interface (Rest API).
9
+ - Performs preprocessing on the raw data through data pipelines.
10
+ - Pass the processed data to the ML model for Prediction.
11
+ - Display the Predictions to the User on the Web page.
12
+
13
+ ## Getting Started
14
+
15
+ ### Prerequisites
16
+
17
+ - Python 3.10
18
+ - Virtualenv (optional but recommended)
19
+
20
+ ### Installation
21
+
22
+ 1. Clone the repository:
23
+
24
+ ```bash
25
+ git clone https://github.com/SinghJagpreet096/Studentperformanceindicator-with-mlops
26
+ cd Studentperformanceindicator-with-mlops
27
+ ```
28
+
29
+ 2. (Optional) Create and activate a virtual environment:
30
+
31
+ ```bash
32
+ python3 -m venv venv
33
+ source venv/bin/activate
34
+ ```
35
+
36
+ 3. Install the required dependencies from requirements.txt:
37
+
38
+ ```bash
39
+ pip install -r requirements.txt
40
+ ```
41
+
42
+ ### Running the Application
43
+
44
+ 1. Start the Flask application:
45
+
46
+ ```bash
47
+ python application.py
48
+ ```
49
+
50
+ 2. Open your web browser and navigate to http://127.0.0.1:5000 to access the web interface.
51
+
52
+ 3. Enter details in the Web interface to get the Predictions.
53
+
54
+ ### Usage
55
+ - Enter details in the Given drop-down and text fields.
56
+ - Click the Submit button to get the prediction.
57
+
58
+ ### Contributing
59
+ Contributions are welcome! If you'd like to contribute to this project, please follow the guidelines in CONTRIBUTING.md.
60
+
61
+ ### License
62
+ This project is licensed under the MIT License - see the LICENSE file for details.
63
+
64
+
65
+
66
+
application.py CHANGED
@@ -21,7 +21,7 @@ def index():
21
  def predict_datapoint():
22
  try:
23
  if request.method == 'GET':
24
- return render_template('home.html')
25
  else:
26
 
27
  data=CustomData(
@@ -38,7 +38,7 @@ def predict_datapoint():
38
  predict_pipeline = PredictPipeline()
39
 
40
  results = predict_pipeline.predict(pred_df)
41
- return render_template('home.html',results=results[0])
42
  except Exception as e:
43
  raise CustomException(e,sys)
44
 
 
21
  def predict_datapoint():
22
  try:
23
  if request.method == 'GET':
24
+ return render_template('index.html')
25
  else:
26
 
27
  data=CustomData(
 
38
  predict_pipeline = PredictPipeline()
39
 
40
  results = predict_pipeline.predict(pred_df)
41
+ return render_template('index.html',results=results[0])
42
  except Exception as e:
43
  raise CustomException(e,sys)
44
 
setup.py CHANGED
@@ -23,4 +23,5 @@ setup(
23
  packages=find_packages(),
24
  install_requires = get_requirements('requirements.txt')
25
 
26
- )
 
 
23
  packages=find_packages(),
24
  install_requires = get_requirements('requirements.txt')
25
 
26
+ )
27
+
templates/home.html DELETED
@@ -1,111 +0,0 @@
1
- <html>
2
- <body>
3
- <div class="login">
4
- <h1>Student Exam Performance Indicator</h1>
5
-
6
- <form action="{{ url_for('predict_datapoint')}}" method="post">
7
- <h1>
8
- <legend>Student Exam Performance Prediction</legend>
9
- </h1>
10
- <div class="mb-3">
11
- <label class="form-label">Gender</label>
12
- <select class="form-control" name="gender" placeholder="Enter you Gender" required>
13
- <option class="placeholder" selected disabled value="">Select your Gender</option>
14
- <option value="male">
15
- Male
16
- </option>
17
- <option value="female">
18
- Female
19
- </option>
20
- </select>
21
- </div>
22
- <div class="mb-3">
23
- <label class="form-label">Race or Ethnicity</label>
24
- <select class="form-control" name="ethnicity" placeholder="Enter you ethnicity" required>
25
- <option class="placeholder" selected disabled value="">Select Ethnicity</option>
26
- <option value="group A">
27
- Group A
28
- </option>
29
- <option value="group B">
30
- Group B
31
- </option>
32
- <option value="group C">
33
- Group C
34
- </option>
35
- <option value="group D">
36
- Group D
37
- </option>
38
- <option value="group E">
39
- Group E
40
- </option>
41
- </select>
42
- </div>
43
- <div class="mb-3">
44
- <label class="form-label">Parental Level of Education</label>
45
- <select class="form-control" name="parental_level_of_education"
46
- placeholder="Enter you Parent Education" required>
47
- <option class="placeholder" selected disabled value="">Select Parent Education</option>
48
- <option value="associate's degree">
49
- associate's degree
50
- </option>
51
- <option value="bachelor's degree">
52
- bachelor's degree
53
- </option>
54
- <option value="high school">
55
- high school
56
- </option>
57
- <option value="master's degree">
58
- master's degree
59
- </option>
60
- <option value="some college">
61
- some college
62
- </option>
63
- <option value="some high school">
64
- some high school
65
- </option>
66
- </select>
67
- </div>
68
- <div class="mb-3">
69
- <label class="form-label">Lunch Type</label>
70
- <select class="form-control" name="lunch" placeholder="Enter you Lunch" required>
71
- <option class="placeholder" selected disabled value="">Select Lunch Type</option>
72
- <option value="free/reduced">
73
- free/reduced
74
- </option>
75
- <option value="standard">
76
- standard
77
- </option>
78
- </select>
79
- </div>
80
- <div class="mb-3">
81
- <label class="form-label">Test preparation Course</label>
82
- <select class="form-control" name="test_preparation_course" placeholder="Enter you Course"
83
- required>
84
- <option class="placeholder" selected disabled value="">Select Test_course</option>
85
- <option value="none">
86
- None
87
- </option>
88
- <option value="completed">
89
- Completed
90
- </option>
91
- </select>
92
- </div>
93
- <div class="mb-3">
94
- <label class="form-label">Writing Score out of 100</label>
95
- <input class="form-control" type="number" name="reading_score"
96
- placeholder="Enter your Writing Score score" min='0' max='100' />
97
- </div>
98
- <div class="mb-3">
99
- <label class="form-label">Reading Score out of 100</label>
100
- <input class="form-control" type="number" name="writing_score"
101
- placeholder="Enter your Reading Score" min='0' max='100' />
102
- </div>
103
- <div class="mb-3">
104
- <input class="btn btn-primary" type="submit" value="Predict your Maths Score" required />
105
- </div>
106
- </form>
107
- <h2>
108
- THE prediction is {{results}}
109
- </h2>
110
- <body>
111
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/index.html CHANGED
@@ -1 +1,136 @@
1
- <h1>Welcome</h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Student Exam Performance Predictor</title>
7
+ <style>
8
+ body {
9
+ background: url('https://ed.stanford.edu/sites/default/files/news_images/biologygettyimages-535847793.jpg') center/cover no-repeat; /* Replace 'your-background-image.jpg' with the actual path to your image */
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ height: 100vh;
14
+ margin: 0;
15
+ }
16
+
17
+ .login {
18
+ background-color: rgb(207, 192, 235); /* Set your desired background color */
19
+ padding: 20px;
20
+ border-radius: 8px;
21
+ box-shadow: 0 0 10px rgba(158, 121, 121, 0.1);
22
+ }
23
+
24
+ /* Add any other CSS styles as needed */
25
+ </style>
26
+ </head>
27
+ <body>
28
+ <div class="login">
29
+
30
+ <form action="{{ url_for('predict_datapoint')}}" method="post">
31
+ <h1>
32
+ <legend>Student Exam Performance Prediction</legend>
33
+ </h1>
34
+ <div class="mb-3">
35
+ <label class="form-label">Gender</label>
36
+ <select class="form-control" name="gender" placeholder="Enter you Gender" required>
37
+ <option class="placeholder" selected disabled value="">Select your Gender</option>
38
+ <option value="male">
39
+ Male
40
+ </option>
41
+ <option value="female">
42
+ Female
43
+ </option>
44
+ </select>
45
+ </div>
46
+ <div class="mb-3">
47
+ <label class="form-label">Race or Ethnicity</label>
48
+ <select class="form-control" name="ethnicity" placeholder="Enter you ethnicity" required>
49
+ <option class="placeholder" selected disabled value="">Select Ethnicity</option>
50
+ <option value="group A">
51
+ Group A
52
+ </option>
53
+ <option value="group B">
54
+ Group B
55
+ </option>
56
+ <option value="group C">
57
+ Group C
58
+ </option>
59
+ <option value="group D">
60
+ Group D
61
+ </option>
62
+ <option value="group E">
63
+ Group E
64
+ </option>
65
+ </select>
66
+ </div>
67
+ <div class="mb-3">
68
+ <label class="form-label">Parental Level of Education</label>
69
+ <select class="form-control" name="parental_level_of_education"
70
+ placeholder="Enter you Parent Education" required>
71
+ <option class="placeholder" selected disabled value="">Select Parent Education</option>
72
+ <option value="associate's degree">
73
+ associate's degree
74
+ </option>
75
+ <option value="bachelor's degree">
76
+ bachelor's degree
77
+ </option>
78
+ <option value="high school">
79
+ high school
80
+ </option>
81
+ <option value="master's degree">
82
+ master's degree
83
+ </option>
84
+ <option value="some college">
85
+ some college
86
+ </option>
87
+ <option value="some high school">
88
+ some high school
89
+ </option>
90
+ </select>
91
+ </div>
92
+ <div class="mb-3">
93
+ <label class="form-label">Lunch Type</label>
94
+ <select class="form-control" name="lunch" placeholder="Enter you Lunch" required>
95
+ <option class="placeholder" selected disabled value="">Select Lunch Type</option>
96
+ <option value="free/reduced">
97
+ free/reduced
98
+ </option>
99
+ <option value="standard">
100
+ standard
101
+ </option>
102
+ </select>
103
+ </div>
104
+ <div class="mb-3">
105
+ <label class="form-label">Test preparation Course</label>
106
+ <select class="form-control" name="test_preparation_course" placeholder="Enter you Course"
107
+ required>
108
+ <option class="placeholder" selected disabled value="">Select Test_course</option>
109
+ <option value="none">
110
+ None
111
+ </option>
112
+ <option value="completed">
113
+ Completed
114
+ </option>
115
+ </select>
116
+ </div>
117
+ <div class="mb-3">
118
+ <label class="form-label">Writing Score out of 100</label>
119
+ <input class="form-control" type="number" name="reading_score"
120
+ placeholder="Enter your Writing Score score" min='0' max='100' />
121
+ </div>
122
+ <div class="mb-3">
123
+ <label class="form-label">Reading Score out of 100</label>
124
+ <input class="form-control" type="number" name="writing_score"
125
+ placeholder="Enter your Reading Score" min='0' max='100' />
126
+ </div>
127
+ <div class="mb-3">
128
+ <input class="btn btn-primary" type="submit" value="Predict your Maths Score" required />
129
+ </div>
130
+ </form>
131
+ <h2>
132
+ THE prediction is {{results}}
133
+ </h2>
134
+ </div>
135
+ </body>
136
+ </html>