Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def calculate_bmi(height, weight):
|
4 |
+
bmi = weight / (height * height)
|
5 |
+
return bmi
|
6 |
+
|
7 |
+
iface = gr.Interface(
|
8 |
+
fn=calculate_bmi,
|
9 |
+
inputs=["number", "number"],
|
10 |
+
outputs="number",
|
11 |
+
examples=[
|
12 |
+
[1.7, 70],
|
13 |
+
[1.8, 75],
|
14 |
+
])
|
15 |
+
|
16 |
+
iface.launch()
|