Ver Fonte

fix gen avatar

ming há 3 anos atrás
pai
commit
92b14aa515
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      api/util/swap_face.py

+ 1 - 2
api/util/swap_face.py

@@ -10,6 +10,7 @@ class swap_face():
         name_hash = str(time.time()).replace('.','')
         name_hash = str(time.time()).replace('.','')
         src_img = 'FaceSwap/src_img/'+name_hash+'.jpg'
         src_img = 'FaceSwap/src_img/'+name_hash+'.jpg'
         sv_path = '/var/www/html/swap_save/'+name_hash+'.avi'
         sv_path = '/var/www/html/swap_save/'+name_hash+'.avi'
+        print(name_hash)
         
         
         try:
         try:
             im = Image.open(requests.get(self.imgurl, stream=True).raw)
             im = Image.open(requests.get(self.imgurl, stream=True).raw)
@@ -28,8 +29,6 @@ class swap_face():
                 break
                 break
             time.sleep(10)
             time.sleep(10)
             load_time+=10
             load_time+=10
-            if load_time > 30:
-                break
         
         
             print('waiting...')
             print('waiting...')
         self.notify_group('人物生成成功,在:www.choozmo.com:8168/swap_save/'+name_hash+'.avi')
         self.notify_group('人物生成成功,在:www.choozmo.com:8168/swap_save/'+name_hash+'.avi')