Spaces:
Sleeping
Sleeping
Commit
·
5aef741
1
Parent(s):
c1c60a9
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pickle
|
2 |
+
import gradio as gr
|
3 |
+
with open("Model_Pickle",'rb') as f:
|
4 |
+
mp=pickle.load(f)
|
5 |
+
|
6 |
+
def prediction(height):
|
7 |
+
conv_height=int(height)
|
8 |
+
result=mp.predict([[conv_height]])
|
9 |
+
final_result=int(result[0])
|
10 |
+
return final_result
|
11 |
+
|
12 |
+
interface=gr.Interface(fn=prediction,inputs=[gr.inputs.Textbox(lines=2,placeholder=("Enter Your Height in Inches"),label="Weight Prediction")],outputs=[gr.outputs.Textbox(label="Your Weight in Pounds")],enable_queu=True)
|
13 |
+
interface.launch(debug=True)
|