cappuch commited on
Commit
a70af87
1 Parent(s): a893990

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,11 +8,12 @@ from basicsr.utils.download_util import load_file_from_url
8
  from realesrgan import RealESRGANer
9
  from realesrgan.archs.srvgg_arch import SRVGGNetCompact
10
  from torchvision.transforms.functional import rgb_to_grayscale
11
-
12
 
13
  last_file = None
14
  img_mode = "RGBA"
15
 
 
16
  def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
17
  """Real-ESRGAN function to restore (and upscale) images.
18
  """
 
8
  from realesrgan import RealESRGANer
9
  from realesrgan.archs.srvgg_arch import SRVGGNetCompact
10
  from torchvision.transforms.functional import rgb_to_grayscale
11
+ import spaces
12
 
13
  last_file = None
14
  img_mode = "RGBA"
15
 
16
+ @spaces.GPU()
17
  def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
18
  """Real-ESRGAN function to restore (and upscale) images.
19
  """