Explorar el Código

add swap face test

ming hace 4 años
padre
commit
e9a3d5e3d9
Se han modificado 1 ficheros con 2 adiciones y 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()