Spaces:
Sleeping
Sleeping
amudassir786
commited on
Commit
•
c22294d
1
Parent(s):
70669fc
Create bmi_demo
Browse files
bmi_demo
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
def bmi(name, height,weight,feeling):
|
2 |
+
bmi_val = weight / ((height/100) ** 2)
|
3 |
+
txt_feeling = "Happy" if feeling else "Sad"
|
4 |
+
return "Welcome " + name + " ...\n Your BMI Value is " + str(bmi_val),txt_feeling
|
5 |
+
interface = gr.Interface(fn=bmi,
|
6 |
+
inputs=["text", gr.Slider(0,200,label="Height in Centi Meters"),
|
7 |
+
gr.Slider(0,200,label="Weight in Kgs"),gr.Checkbox("Your Feeling Today")],
|
8 |
+
outputs=["text","text"])
|
9 |
+
interface.launch()
|