debug
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def classify_image(input_image) -> str:
|
|
38 |
padding=True).to(device)
|
39 |
outputs = model(**inputs)
|
40 |
probs = outputs.logits_per_image.softmax(dim=1)
|
41 |
-
class_index = np.argmax(probs.detach().numpy())
|
42 |
return imagenet_classes[class_index]
|
43 |
|
44 |
|
|
|
38 |
padding=True).to(device)
|
39 |
outputs = model(**inputs)
|
40 |
probs = outputs.logits_per_image.softmax(dim=1)
|
41 |
+
class_index = np.argmax(probs.detach().cpu().numpy())
|
42 |
return imagenet_classes[class_index]
|
43 |
|
44 |
|