rogerxavier commited on
Commit
06a0cd9
1 Parent(s): 63aa27b

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +3 -1
api.py CHANGED
@@ -31,10 +31,12 @@ def t5():
31
 
32
  @app.post("/getOriginalMangaList")
33
  async def getOriginalMangaList(images: List[UploadFile] = File(...)):
34
- for idx, image in enumerate(images):
 
35
  img = await image.read()
36
  image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
37
  path_to_image = f"/manga/{idx}.jpg"
38
  image.save(path_to_image)
 
39
  return "获取图片保存成功"
40
 
 
31
 
32
  @app.post("/getOriginalMangaList")
33
  async def getOriginalMangaList(images: List[UploadFile] = File(...)):
34
+
35
+ for idx, image in enumerate(images):
36
  img = await image.read()
37
  image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
38
  path_to_image = f"/manga/{idx}.jpg"
39
  image.save(path_to_image)
40
+
41
  return "获取图片保存成功"
42