John6666 commited on
Commit
922b4e3
1 Parent(s): 261903d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import torch
3
  from PIL import Image
@@ -5,7 +6,7 @@ from utils import WaifuScorer
5
 
6
  SCORER = None
7
 
8
-
9
  def score_image(image: Image.Image) -> float:
10
  global SCORER
11
  if SCORER is None:
 
1
+ import spaces
2
  import gradio as gr
3
  import torch
4
  from PIL import Image
 
6
 
7
  SCORER = None
8
 
9
+ @spaces.GPU(duration=30)
10
  def score_image(image: Image.Image) -> float:
11
  global SCORER
12
  if SCORER is None: