TheStinger commited on
Commit
66a0373
·
verified ·
1 Parent(s): 6b6b316

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  import cv2
3
  import numpy
4
  import os
 
5
  import random
6
  from basicsr.archs.rrdbnet_arch import RRDBNet
7
  from basicsr.utils.download_util import load_file_from_url
@@ -13,7 +14,7 @@ from realesrgan.archs.srvgg_arch import SRVGGNetCompact
13
  last_file = None
14
  img_mode = "RGBA"
15
 
16
-
17
  def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
18
  """Real-ESRGAN function to restore (and upscale) images.
19
  """
 
2
  import cv2
3
  import numpy
4
  import os
5
+ import spaces
6
  import random
7
  from basicsr.archs.rrdbnet_arch import RRDBNet
8
  from basicsr.utils.download_util import load_file_from_url
 
14
  last_file = None
15
  img_mode = "RGBA"
16
 
17
+ @spaces.GPU
18
  def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
19
  """Real-ESRGAN function to restore (and upscale) images.
20
  """