@@ -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()