import gradio as gr def calculate_bmi(height, weight): bmi = weight / (height/100)**2 return f"Your BMI is: {bmi:.2f}" demo = gr.Interface( fn=calculate_bmi, inputs=[gr.Number(label="Height (cm)"), gr.Number(label="Weight (kg)")], outputs="text" ) demo.launch()