왓슨 기초

This commit is contained in:
Mingu Kim
2026-05-26 22:08:02 +09:00
parent 8a18105599
commit a1cb6fcdf9
26 changed files with 3921 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import gradio as gr
def bmi_calculator(height, weight):
bmi = weight / (float(height / 100) ** 2)
if bmi < 18.5 :
result = "저체중"
elif bmi < 22.9 :
result = "정상체중"
elif bmi < 24.9 :
result = "과체중"
else :
result = "비만"
# 당신의 BMI 지수는 키 : 158, 몸무게 : 60, 판정 : 저체중
return f"당신의 BMI 지수는 키 : {height}, 몸무게 : {weight}, 판정 : {result}"
demo = gr.Interface(
fn=bmi_calculator,
inputs=[gr.Number(label = ""), gr.Number(label = "몸무게")],
outputs=[gr.Text(label= "BMI 판정")],
api_name="BMI 측정기"
)
demo.launch()