Xuanyou commited on
Commit
0e5473e
Β·
verified Β·
1 Parent(s): 83c1c51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -85,7 +85,7 @@ def download_huggingface_resources():
85
  print("General error in downloading resources:", e)
86
  raise
87
 
88
- download_huggingface_resources():
89
 
90
 
91
  def get_project_root():
@@ -532,7 +532,6 @@ def generate_spirit_animal_video(driving_video_path):
532
  return None
533
 
534
 
535
- @spaces.GPU(duration=120)
536
  def generate_spirit_animal(image, animal_type, background):
537
  if animal_type == "Single Animal":
538
  if background == "Preserve Background":
@@ -547,7 +546,6 @@ def generate_spirit_animal(image, animal_type, background):
547
  return prompt, generated_images
548
 
549
 
550
- @spaces.GPU(duration=120)
551
  def compress_video(input_path, output_path, target_size_mb):
552
  target_size_bytes = target_size_mb * 1024 * 1024
553
  temp_output = "./temp_compressed.mp4"
@@ -576,7 +574,7 @@ def compress_video(input_path, output_path, target_size_mb):
576
  else:
577
  shutil.move(temp_output, output_path)
578
 
579
- @spaces.GPU(duration=120)
580
  def process_video(video_file):
581
 
582
  # # εˆε§‹εŒ– LivePortrait
 
85
  print("General error in downloading resources:", e)
86
  raise
87
 
88
+ download_huggingface_resources()
89
 
90
 
91
  def get_project_root():
 
532
  return None
533
 
534
 
 
535
  def generate_spirit_animal(image, animal_type, background):
536
  if animal_type == "Single Animal":
537
  if background == "Preserve Background":
 
546
  return prompt, generated_images
547
 
548
 
 
549
  def compress_video(input_path, output_path, target_size_mb):
550
  target_size_bytes = target_size_mb * 1024 * 1024
551
  temp_output = "./temp_compressed.mp4"
 
574
  else:
575
  shutil.move(temp_output, output_path)
576
 
577
+
578
  def process_video(video_file):
579
 
580
  # # εˆε§‹εŒ– LivePortrait