bmi_repo / app.py
CASLL's picture
Create app.py
8e9ae48 verified
def bmi_calc(altura, peso):
bmi = peso / (altura/100)**2
return f'Seu BMI é de {bmi:.2f}'
import gradio as gr
interface = gr.Interface(
fn = bmi_calc,
inputs = [gr.Slider(0, 200, label='Altura em cm'), gr.Slider(0, 100, label='Peso em KG')],
outputs = ['text'],
examples=[[200, 50],
[180, 50]],
live = True,
theme=gr.themes.Soft()
)
interface.launch()