Spaces:
Running
Running
Update app.py
Browse files
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:
|