Spaces:
Sleeping
Sleeping
File size: 596 Bytes
d3394dc 1d743bb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import pickle as pk
import gradio as gr
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
loaded_model = pk.load(open("score_predict.pkl", "rb"), encoding="bytes")
def predict_my_score(hours_of_study):
input_arr = [[hours_of_study]]
y_predict_new = loaded_model.predict(input_arr)
return int(y_predict_new[0][0])
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")
interface.launch(share = True)
|