Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,11 +26,8 @@ interface = gr.Interface(
|
|
| 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()
|
|
|
|
| 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 |
+
live=False # This will require user to click "Submit" button to trigger the function
|
| 30 |
)
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# Launch the interface
|
| 33 |
interface.launch()
|