syurein commited on
Commit
dab2956
·
1 Parent(s): ae047d1

性能向上

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1204,8 +1204,13 @@ async def create_mask_sum2(image: UploadFile = File(...), risk_level: int = Form
1204
  print('point1,point2',point1,point2)#消去したくない範囲のこと
1205
  # OpenCVでインペイント
1206
  inpaint_image_with_mask1(input_path, mask_path, output_path)
1207
-
1208
- return FileResponse(output_path)
 
 
 
 
 
1209
 
1210
 
1211
  #三浦と相談
 
1204
  print('point1,point2',point1,point2)#消去したくない範囲のこと
1205
  # OpenCVでインペイント
1206
  inpaint_image_with_mask1(input_path, mask_path, output_path)
1207
+ response=await classify_image_llm2(image)
1208
+ response = response['danger'] # レスポンスから必要な情報を抽出
1209
+ return FileResponse(
1210
+ output_path,
1211
+ media_type="image/jpeg",
1212
+ headers={"x-danger": str(response)} # 実際の処理では危険度を適切に設定
1213
+ )
1214
 
1215
 
1216
  #三浦と相談