File size: 635 Bytes
5d4d49e
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr

def bmi(name, height, weight):
    bmi_val= weight / (height ** 2)
    return f"Your Bmi is {str(bmi_val)}!"

interface = gr.Interface(fn = bmi, inputs = ["text", gr.inputs.Slider(0,100,label = "height"),gr.inputs.Slider(0,100,label = 'Weight')], 
                         outputs = ['text'], 
                        examples = [['R.Aravindan',170,89],['R.Bro Your name',170,89]], 
                        theme = 'darkhuggingface',
                        title = "BMI CALCULATOR", 
                        description = "Use this example and try to run the same example by clicking that").launch(inline = False)