riciii7 commited on
Commit
745c768
·
verified ·
1 Parent(s): f9c687f

fix: add change ratio from pixel to cm

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,7 +54,7 @@ async def inference(file: UploadFile):
54
  })
55
 
56
 
57
- AVERAGE_TUMOR_VOLUME = 523.6
58
 
59
  def calculate_sphere_volume(width, height):
60
  """
@@ -66,7 +66,7 @@ def calculate_sphere_volume(width, height):
66
  diameter = (width + height) / 2
67
  radius = diameter / 2
68
  volume = (4/3) * math.pi * (radius ** 3)
69
- return round(volume, 2)
70
  except Exception as e:
71
  print(f"Terjadi error: {e}")
72
  return None
 
54
  })
55
 
56
 
57
+ AVERAGE_TUMOR_VOLUME = 5751.46
58
 
59
  def calculate_sphere_volume(width, height):
60
  """
 
66
  diameter = (width + height) / 2
67
  radius = diameter / 2
68
  volume = (4/3) * math.pi * (radius ** 3)
69
+ return round(volume, 2) * 0.002274162
70
  except Exception as e:
71
  print(f"Terjadi error: {e}")
72
  return None