EAV123 commited on
Commit
653fbbc
·
verified ·
1 Parent(s): d94508f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import streamlit as st
2
  import pickle
3
- from sklearn.ensemble import RandomForestRegressor
4
  import numpy as np
5
 
6
  # Load the saved model
@@ -51,7 +50,9 @@ def main():
51
 
52
  # Make prediction
53
  if st.button("Predict Exam Score"):
54
- prediction = make_prediction(model, np.array([[level, course_units, total_score]]))
 
 
55
  st.write(f"Predicted Exam Score: {prediction[0]:.2f}")
56
 
57
  # Calculate GPA
 
1
  import streamlit as st
2
  import pickle
 
3
  import numpy as np
4
 
5
  # Load the saved model
 
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