Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def predict(image):
|
|
75 |
with torch.no_grad():
|
76 |
img_emb = model2.encode_image(inputs)
|
77 |
img_emb = normalized(img_emb.cpu().numpy())
|
78 |
-
prediction = model(torch.from_numpy(img_emb).to(device).type(torch.
|
79 |
|
80 |
result = {
|
81 |
"clip_aesthetic": prediction,
|
|
|
75 |
with torch.no_grad():
|
76 |
img_emb = model2.encode_image(inputs)
|
77 |
img_emb = normalized(img_emb.cpu().numpy())
|
78 |
+
prediction = model(torch.from_numpy(img_emb).to(device).type(torch.FloatTensor)).item()
|
79 |
|
80 |
result = {
|
81 |
"clip_aesthetic": prediction,
|