EngrZiaQazi commited on
Commit
f7664e5
1 Parent(s): c65d0fa

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import gradio as gr
3
+ #function to predict the input hours
4
+ def predict_score(hours):
5
+ #hours = np.array(hours)
6
+ pred_score = -0.5738734424645411 + 2.1659122905141825*hours
7
+ return pred_score #np.round(pred_score[0], 2)
8
+ input = gr.inputs.Number(label='Number of Hours studied')
9
+ output = gr.outputs.Textbox(label='Predicted Score')
10
+ gr.Interface( fn=predict_score,
11
+ inputs=input,
12
+ outputs=output).launch();