syurein commited on
Commit
b3d6d35
·
1 Parent(s): d638497
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -999,12 +999,12 @@ async def classify_image_llm(file: UploadFile = File(...)):
999
  async def create_mask_sum2(image: UploadFile = File(...),
1000
  scene: str = Form(...),
1001
  mode: str = Form(...),
1002
- risk_level: str = Form(...),
1003
  rect: str = Form(...),):
1004
  default_x = 0.001
1005
  default_y = 0.001
1006
- risk_level= int(risk_level) if risk_level.isdigit() else 0 # リスクレベルを整数に変換
1007
-
1008
  # rect JSON文字列をパースして座標を取得
1009
  try:
1010
  # rectが空文字列や "null" の場合を考慮
 
999
  async def create_mask_sum2(image: UploadFile = File(...),
1000
  scene: str = Form(...),
1001
  mode: str = Form(...),
1002
+ value: str = Form(...),
1003
  rect: str = Form(...),):
1004
  default_x = 0.001
1005
  default_y = 0.001
1006
+ value= int(value) if value.isdigit() else 0 # リスクレベルを整数に変換
1007
+
1008
  # rect JSON文字列をパースして座標を取得
1009
  try:
1010
  # rectが空文字列や "null" の場合を考慮