linoyts HF staff commited on
Commit
925c814
1 Parent(s): fbae227

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ import numpy as np
21
  import cv2
22
  import os
23
  import random
24
-
25
 
26
  def nms(x, t, s):
27
  x = cv2.GaussianBlur(x.astype(np.float32), (0, 0), s)
@@ -158,7 +158,7 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
158
  seed = random.randint(0, MAX_SEED)
159
  return seed
160
 
161
-
162
  def run(
163
  image: PIL.Image.Image,
164
  prompt: str,
 
21
  import cv2
22
  import os
23
  import random
24
+ import spaces
25
 
26
  def nms(x, t, s):
27
  x = cv2.GaussianBlur(x.astype(np.float32), (0, 0), s)
 
158
  seed = random.randint(0, MAX_SEED)
159
  return seed
160
 
161
+ @spaces.GPU
162
  def run(
163
  image: PIL.Image.Image,
164
  prompt: str,