alexnasa commited on
Commit
785facd
·
verified ·
1 Parent(s): 665fa8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -635,6 +635,8 @@ def infer_scene(image_path, audio_path, text, orientation_state, num_steps, sess
635
  if session_id is None:
636
  session_id = uuid.uuid4().hex
637
 
 
 
638
  try:
639
  result = infer(image_path, audio_path, text, orientation_state, num_steps, session_id, progress)
640
  except Exception as e:
@@ -698,6 +700,7 @@ def cleanup(request: gr.Request):
698
 
699
  sid = request.session_hash
700
  if sid:
 
701
  d1 = os.path.join(os.environ["PROCESSED_RESULTS"], sid)
702
  shutil.rmtree(d1, ignore_errors=True)
703
 
@@ -854,7 +857,7 @@ with gr.Blocks(css=css) as demo:
854
  with gr.Column():
855
 
856
  output_video = gr.Video(label="Avatar", height=512)
857
- num_steps = gr.Slider(4, 50, value=8, step=1, label="Steps")
858
 
859
  time_required = gr.Text(value="⌚ Zero GPU Required: --", show_label=False, visible=False)
860
  infer_btn = gr.Button("🦜 Avatar Me", variant='primary', elem_classes="button-gradient")
 
635
  if session_id is None:
636
  session_id = uuid.uuid4().hex
637
 
638
+ result = None
639
+
640
  try:
641
  result = infer(image_path, audio_path, text, orientation_state, num_steps, session_id, progress)
642
  except Exception as e:
 
700
 
701
  sid = request.session_hash
702
  if sid:
703
+ print(f"{sid} left")
704
  d1 = os.path.join(os.environ["PROCESSED_RESULTS"], sid)
705
  shutil.rmtree(d1, ignore_errors=True)
706
 
 
857
  with gr.Column():
858
 
859
  output_video = gr.Video(label="Avatar", height=512)
860
+ num_steps = gr.Slider(4, 50, value=4, step=1, label="Steps")
861
 
862
  time_required = gr.Text(value="⌚ Zero GPU Required: --", show_label=False, visible=False)
863
  infer_btn = gr.Button("🦜 Avatar Me", variant='primary', elem_classes="button-gradient")