Browse Source

add save src face

ming 3 years ago
parent
commit
5caea53ff1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/main.py

+ 1 - 1
api/main.py

@@ -94,7 +94,7 @@ async def swapFace(req:swap_req):
     except:
         return {'msg':"無法辨別圖片網址"+req.imgurl}
     name_hash = str(time.time()).replace('.','')
-    im = Image.open(requests.get(imgurl, stream=True).raw)
+    im = Image.open(requests.get(req.imgurl, stream=True).raw)
     im= im.convert("RGB")
     im.save('../../face_swap/tmp_face/'+name_hash+'.jpg')
     x = threading.Thread(target=gen_avatar, args=(name_hash,req.imgurl))