Numair22 commited on
Commit
a299736
·
verified ·
1 Parent(s): 2d7730e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,9 +6,9 @@ from sklearn.linear_model import LinearRegression
6
  loaded_model = pk.load(open("score_predict.pkl", "rb"), encoding="bytes")
7
 
8
  def predict_my_score(hours_of_study):
9
- input_arr = [[hours_of_study]]
10
- y_predict_new = loaded_model.predict(input_arr)
11
- return int(y_predict_new[0][0])
12
 
13
  interface = gr.Interface(predict_my_score, title = "Predict My Score ", description = "Enter the hours you study per day and know your score.", inputs = "number", outputs = "number")
14
  interface.launch(share = True)
 
6
  loaded_model = pk.load(open("score_predict.pkl", "rb"), encoding="bytes")
7
 
8
  def predict_my_score(hours_of_study):
9
+ input_arr = [[hours_of_study]]
10
+ y_predict_new = loaded_model.predict(input_arr)
11
+ return int(y_predict_new[0][0])
12
 
13
  interface = gr.Interface(predict_my_score, title = "Predict My Score ", description = "Enter the hours you study per day and know your score.", inputs = "number", outputs = "number")
14
  interface.launch(share = True)