Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,14 +21,16 @@ interface = gr.Interface(
|
|
| 21 |
inputs=[
|
| 22 |
gr.Number(label="Weight (kg)"), # Input for weight
|
| 23 |
gr.Number(label="Feet"), # Input for feet
|
| 24 |
-
gr.Number(label="Inches")
|
| 25 |
-
gr.Button("Submit") # Submit button
|
| 26 |
],
|
| 27 |
outputs="text",
|
| 28 |
title="BMI Calculator",
|
| 29 |
-
description="Enter your weight in kilograms (kg), height in feet, and inches to calculate your
|
| 30 |
-
live=True
|
| 31 |
)
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# Launch the interface
|
| 34 |
interface.launch()
|
|
|
|
| 21 |
inputs=[
|
| 22 |
gr.Number(label="Weight (kg)"), # Input for weight
|
| 23 |
gr.Number(label="Feet"), # Input for feet
|
| 24 |
+
gr.Number(label="Inches") # Input for inches
|
|
|
|
| 25 |
],
|
| 26 |
outputs="text",
|
| 27 |
title="BMI Calculator",
|
| 28 |
+
description="Enter your weight in kilograms (kg), height in feet, and inches. Click 'Submit' to calculate your BMI.",
|
|
|
|
| 29 |
)
|
| 30 |
|
| 31 |
+
# Add a button to trigger the calculation
|
| 32 |
+
button = gr.Button("Submit")
|
| 33 |
+
button.click(fn=interface.submit)
|
| 34 |
+
|
| 35 |
# Launch the interface
|
| 36 |
interface.launch()
|