Explorar o código

add http prefix at swapFace

ming %!s(int64=3) %!d(string=hai) anos
pai
achega
b8e231f8c9
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      api/main.py

+ 1 - 0
api/main.py

@@ -93,6 +93,7 @@ async def swapFace(req:swap_req):
         im= im.convert("RGB")
     except:
         return {'msg':"無法辨別圖片網址"+req.imgurl}
+    name_hash = str(time.time()).replace('.','')
     x = threading.Thread(target=gen_avatar, args=(name_hash,req.imgurl))
     x.start()
     return '人物生成中,請稍候'