Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
8cc1ccb
1
Parent(s):
d2b3ebc
update
Browse files
asset3d_gen/validators/aesthetic_predictor.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
|
3 |
import clip
|
4 |
import numpy as np
|
5 |
import pytorch_lightning as pl
|
@@ -91,6 +91,7 @@ class AestheticPredictor:
|
|
91 |
model.eval()
|
92 |
return model
|
93 |
|
|
|
94 |
def predict(self, image_path):
|
95 |
"""Predict the aesthetic score for a given image.
|
96 |
|
|
|
1 |
import os
|
2 |
+
import spaces
|
3 |
import clip
|
4 |
import numpy as np
|
5 |
import pytorch_lightning as pl
|
|
|
91 |
model.eval()
|
92 |
return model
|
93 |
|
94 |
+
@spaces.GPU
|
95 |
def predict(self, image_path):
|
96 |
"""Predict the aesthetic score for a given image.
|
97 |
|