mashdemy commited on
Commit
1d743bb
1 Parent(s): a4a935f

Create app.py

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