Boboiazumi commited on
Commit
641130a
1 Parent(s): 81fdbb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import torch
2
  from PIL import Image
3
  from RealESRGAN import RealESRGAN
@@ -11,7 +12,7 @@ model4.load_weights('weights/RealESRGAN_x4.pth', download=True)
11
  model8 = RealESRGAN(device, scale=8)
12
  model8.load_weights('weights/RealESRGAN_x8.pth', download=True)
13
 
14
-
15
  def inference(image, size):
16
  global model2
17
  global model4
 
1
+ import spaces
2
  import torch
3
  from PIL import Image
4
  from RealESRGAN import RealESRGAN
 
12
  model8 = RealESRGAN(device, scale=8)
13
  model8.load_weights('weights/RealESRGAN_x8.pth', download=True)
14
 
15
+ @spaces.GPU
16
  def inference(image, size):
17
  global model2
18
  global model4