Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -45,16 +45,17 @@ def main():
|
|
45 |
mid_semester = st.slider("Mid Semester Score", min_value=1, max_value=20, step=1)
|
46 |
assignments = st.slider("Assignments", min_value=1, max_value=10, step=1)
|
47 |
|
48 |
-
# Calculate total score
|
49 |
-
total_score = attendance + mid_semester + assignments
|
50 |
-
|
51 |
# Make prediction
|
52 |
if st.button("Predict Exam Score"):
|
53 |
# Add total_score to the input data
|
54 |
input_data = np.array([[level, course_units, attendance, mid_semester, assignments]])
|
55 |
prediction = make_prediction(model, input_data)
|
56 |
-
st.write(f"Predicted Exam Score: {prediction[0]:.2f}")
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
# Calculate GPA
|
59 |
gpa = calculate_gpa(total_score)
|
60 |
st.write(f"Predicted GPA: {gpa}")
|
|
|
45 |
mid_semester = st.slider("Mid Semester Score", min_value=1, max_value=20, step=1)
|
46 |
assignments = st.slider("Assignments", min_value=1, max_value=10, step=1)
|
47 |
|
|
|
|
|
|
|
48 |
# Make prediction
|
49 |
if st.button("Predict Exam Score"):
|
50 |
# Add total_score to the input data
|
51 |
input_data = np.array([[level, course_units, attendance, mid_semester, assignments]])
|
52 |
prediction = make_prediction(model, input_data)
|
|
|
53 |
|
54 |
+
# Calculate total score
|
55 |
+
total_score = attendance + mid_semester + assignments + prediction[0]
|
56 |
+
|
57 |
+
st.write(f"Predicted Exam Score: {prediction[0]:.2f}")
|
58 |
+
|
59 |
# Calculate GPA
|
60 |
gpa = calculate_gpa(total_score)
|
61 |
st.write(f"Predicted GPA: {gpa}")
|