charbel-malo commited on
Commit
80d6532
·
verified ·
1 Parent(s): f311f19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -17,7 +17,6 @@ import threading
17
  import queue
18
  from tqdm import tqdm
19
  import concurrent.futures
20
- from moviepy.editor import VideoFileClip
21
 
22
  from nsfw_checker import NSFWChecker
23
  from face_swapper import Inswapper, paste_to_whole
@@ -83,6 +82,7 @@ print("Starting setup for CUDA 12.4 and cuDNN 9.2.1")
83
  print("\nUninstalling conflicting ONNX Runtime packages...")
84
  run_command([sys.executable, '-m', 'pip', 'uninstall', '-y', 'onnxruntime'], "uninstalling onnxruntime")
85
  run_command([sys.executable, '-m', 'pip', 'uninstall', '-y', 'onnxruntime-gpu'], "uninstalling onnxruntime-gpu")
 
86
 
87
  # Step 2: Install cuDNN 9.2.1 for CUDA 12.4
88
  print("\nInstalling cuDNN 9.2.1 for CUDA 12.4...")
@@ -148,6 +148,8 @@ print("\nSetup complete.")
148
  print("---------------------")
149
  print(ort.get_available_providers())
150
 
 
 
151
  def conditional_download(download_directory_path, urls):
152
  if not os.path.exists(download_directory_path):
153
  os.makedirs(download_directory_path)
 
17
  import queue
18
  from tqdm import tqdm
19
  import concurrent.futures
 
20
 
21
  from nsfw_checker import NSFWChecker
22
  from face_swapper import Inswapper, paste_to_whole
 
82
  print("\nUninstalling conflicting ONNX Runtime packages...")
83
  run_command([sys.executable, '-m', 'pip', 'uninstall', '-y', 'onnxruntime'], "uninstalling onnxruntime")
84
  run_command([sys.executable, '-m', 'pip', 'uninstall', '-y', 'onnxruntime-gpu'], "uninstalling onnxruntime-gpu")
85
+ run_command([sys.executable, '-m', 'pip', 'install', '-y', 'moviepy'], "installing moviepy")
86
 
87
  # Step 2: Install cuDNN 9.2.1 for CUDA 12.4
88
  print("\nInstalling cuDNN 9.2.1 for CUDA 12.4...")
 
148
  print("---------------------")
149
  print(ort.get_available_providers())
150
 
151
+ from moviepy.editor import *
152
+
153
  def conditional_download(download_directory_path, urls):
154
  if not os.path.exists(download_directory_path):
155
  os.makedirs(download_directory_path)