Spanicin commited on
Commit
7eb654c
·
verified ·
1 Parent(s): 1daefb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -27,7 +27,7 @@ import moviepy.editor as mp
27
  # import base64
28
  # import gfpgan_enhancer
29
 
30
- start_time = time.time()
31
 
32
  class AnimationConfig:
33
  def __init__(self, driven_audio_path, source_image_path, result_folder,pose_style,expression_scale,enhancer,still,preprocess,ref_pose_video_path):
@@ -68,6 +68,7 @@ app = Flask(__name__)
68
  CORS(app)
69
 
70
  TEMP_DIR = None
 
71
 
72
  app.config['temp_response'] = None
73
  app.config['generation_thread'] = None
@@ -287,6 +288,8 @@ def chat_avatar(text_prompt):
287
 
288
  @app.route("/run", methods=['POST'])
289
  def generate_video():
 
 
290
  global TEMP_DIR
291
  TEMP_DIR = create_temp_dir()
292
  print('request:',request.method)
 
27
  # import base64
28
  # import gfpgan_enhancer
29
 
30
+
31
 
32
  class AnimationConfig:
33
  def __init__(self, driven_audio_path, source_image_path, result_folder,pose_style,expression_scale,enhancer,still,preprocess,ref_pose_video_path):
 
68
  CORS(app)
69
 
70
  TEMP_DIR = None
71
+ start_time = None
72
 
73
  app.config['temp_response'] = None
74
  app.config['generation_thread'] = None
 
288
 
289
  @app.route("/run", methods=['POST'])
290
  def generate_video():
291
+ global start_time
292
+ start_time = time.time()
293
  global TEMP_DIR
294
  TEMP_DIR = create_temp_dir()
295
  print('request:',request.method)