prithivMLmods commited on
Commit
a3d2d12
·
verified ·
1 Parent(s): f8b0e07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -13,8 +13,13 @@ from roop.processors.frame.core import get_frame_processors_modules
13
  from roop.utilities import normalize_output_path
14
  import os
15
  from PIL import Image
 
 
16
 
 
 
17
 
 
18
  def swap_face(source_file, target_file,doFaceEnhancer):
19
 
20
  source_path = "input.jpg"
 
13
  from roop.utilities import normalize_output_path
14
  import os
15
  from PIL import Image
16
+ import torch
17
+ import spaces
18
 
19
+ if not torch.cuda.is_available():
20
+ DESCRIPTION += "\n<p>⚠️Running on CPU, This may not work on CPU.</p>"
21
 
22
+ @spaces.GPU(duration=60, enable_queue=True)
23
  def swap_face(source_file, target_file,doFaceEnhancer):
24
 
25
  source_path = "input.jpg"