Explorar o código

add swap face test

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

+ 2 - 1
main.py

@@ -111,9 +111,10 @@ async def progress_page():
 
 @app.post("/swapFace")
 async def swapFace(req:swap_req):
-    x = threading.Thread(target=runswap, args=(req.imgurl))
+    x = threading.Thread(target=runswap, args=(str(req.imgurl)))
     x.start()
     return {'msg':'ok'}
+
 def runswap(imgurl):
     sf = swap_face(imgurl)
     result = sf.run()