savitha7 commited on
Commit
ca095a8
·
verified ·
1 Parent(s): d32a712

update classes name

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -7,26 +7,26 @@ model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
7
  processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
8
 
9
  # Define the BMI classes
10
- bmi_classes = ["underweight", "normal weight", "overweight", "obesity"]
11
 
12
  # Define the secondary models for BMI predictions and boundaries
13
  bmi_ranges = {
14
- "underweight": {
15
  "BMI < 16.0": (0, 16.0, 16.0), # Upper boundary 16.0
16
  "16.0 ≤ BMI ≤ 16.99": (16.0, 16.99, 16.5), # Midpoint 16.5
17
  "17.0 ≤ BMI ≤ 18.49": (17.0, 18.49, 17.75) # Midpoint 17.75
18
  },
19
- "normal weight": {
20
  "18.5 ≤ BMI ≤ 20.4": (18.5, 20.4, 19.45), # Midpoint 19.45
21
  "20.5 ≤ BMI ≤ 22.4": (20.5, 22.4, 21.45), # Midpoint 21.45
22
  "22.5 ≤ BMI ≤ 24.9": (22.5, 24.9, 23.7) # Midpoint 23.7
23
  },
24
- "overweight": {
25
  "25.0 ≤ BMI ≤ 26.9": (25.0, 26.9, 25.95), # Midpoint 25.95
26
  "27.0 ≤ BMI ≤ 28.9": (27.0, 28.9, 27.95), # Midpoint 27.95
27
  "29.0 ≤ BMI ≤ 29.9": (29.0, 29.9, 29.45) # Midpoint 29.45
28
  },
29
- "obesity": {
30
  "30.0 ≤ BMI ≤ 34.9": (30.0, 34.9, 32.5), # Midpoint 32.5
31
  "35.0 ≤ BMI ≤ 39.9": (35.0, 39.9, 37.45), # Midpoint 37.45
32
  "BMI ≥ 40.0": (40.0, 100, 40.0) # Lower boundary 40.0
 
7
  processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
8
 
9
  # Define the BMI classes
10
+ bmi_classes = ["underweight (x < 18.5 BMI)", "normal weight (18.5 < x < 25 BMI)", "overweight (25 BMI < x < 30)", "obesity (x > 30 BMI)"]
11
 
12
  # Define the secondary models for BMI predictions and boundaries
13
  bmi_ranges = {
14
+ "underweight (x < 18.5 bmi)": {
15
  "BMI < 16.0": (0, 16.0, 16.0), # Upper boundary 16.0
16
  "16.0 ≤ BMI ≤ 16.99": (16.0, 16.99, 16.5), # Midpoint 16.5
17
  "17.0 ≤ BMI ≤ 18.49": (17.0, 18.49, 17.75) # Midpoint 17.75
18
  },
19
+ "normal weight (18.5 < x < 25 bmi)": {
20
  "18.5 ≤ BMI ≤ 20.4": (18.5, 20.4, 19.45), # Midpoint 19.45
21
  "20.5 ≤ BMI ≤ 22.4": (20.5, 22.4, 21.45), # Midpoint 21.45
22
  "22.5 ≤ BMI ≤ 24.9": (22.5, 24.9, 23.7) # Midpoint 23.7
23
  },
24
+ "overweight (25 bmi < x < 30)": {
25
  "25.0 ≤ BMI ≤ 26.9": (25.0, 26.9, 25.95), # Midpoint 25.95
26
  "27.0 ≤ BMI ≤ 28.9": (27.0, 28.9, 27.95), # Midpoint 27.95
27
  "29.0 ≤ BMI ≤ 29.9": (29.0, 29.9, 29.45) # Midpoint 29.45
28
  },
29
+ "obesity (x > 30 bmi)": {
30
  "30.0 ≤ BMI ≤ 34.9": (30.0, 34.9, 32.5), # Midpoint 32.5
31
  "35.0 ≤ BMI ≤ 39.9": (35.0, 39.9, 37.45), # Midpoint 37.45
32
  "BMI ≥ 40.0": (40.0, 100, 40.0) # Lower boundary 40.0