ML_LR / LRZApp.py
EngrZiaQazi's picture
Upload LRZApp.py
84aac69
raw
history blame contribute delete
462 Bytes
import numpy as np
import gradio as gr
#function to predict the input hours
def predict_score(hours):
#hours = np.array(hours)
pred_score = -0.5738734424645411 + 2.1659122905141825*hours
return pred_score #np.round(pred_score[0], 2)
input = gr.inputs.Number(label='Number of Hours studied')
output = gr.outputs.Textbox(label='Predicted Score')
gr.Interface( fn=predict_score,
inputs=input,
outputs=output).launch();