BMI / bmi_demo
amudassir786's picture
Create bmi_demo
c22294d verified
raw
history blame
No virus
514 Bytes
def bmi(name, height,weight,feeling):
bmi_val = weight / ((height/100) ** 2)
txt_feeling = "Happy" if feeling else "Sad"
return "Welcome " + name + " ...\n Your BMI Value is " + str(bmi_val),txt_feeling
interface = gr.Interface(fn=bmi,
inputs=["text", gr.Slider(0,200,label="Height in Centi Meters"),
gr.Slider(0,200,label="Weight in Kgs"),gr.Checkbox("Your Feeling Today")],
outputs=["text","text"])
interface.launch()