pratikshahp commited on
Commit
8684c7a
·
verified ·
1 Parent(s): 428932b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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"), # Input for 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 Body Mass Index (BMI).",
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()