Parcourir la source

add swap face test

ming il y a 3 ans
Parent
commit
e9a3d5e3d9
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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()