unify implementations
Browse files
app.py
CHANGED
@@ -156,7 +156,8 @@ def run_classifier(image, threshold):
|
|
156 |
tensor = transform(img).unsqueeze(0)
|
157 |
|
158 |
with torch.no_grad():
|
159 |
-
|
|
|
160 |
|
161 |
tag_score = dict()
|
162 |
for i in range(indices.size(0)):
|
|
|
156 |
tensor = transform(img).unsqueeze(0)
|
157 |
|
158 |
with torch.no_grad():
|
159 |
+
probits = model(tensor)[0]
|
160 |
+
values, indices = probits.topk(250)
|
161 |
|
162 |
tag_score = dict()
|
163 |
for i in range(indices.size(0)):
|