Spaces:
Runtime error
Runtime error
PedroMartelleto
commited on
Commit
•
41433b6
1
Parent(s):
87fbe80
small fixes
Browse files
app.py
CHANGED
@@ -36,10 +36,10 @@ class Explainer:
|
|
36 |
|
37 |
self.transformed_img = transform(img)
|
38 |
self.input = transform_normalize(self.transformed_img)
|
39 |
-
self.input = input.unsqueeze(0)
|
40 |
|
41 |
with torch.no_grad():
|
42 |
-
self.output = self.model(input)
|
43 |
self.output = F.softmax(self.output, dim=1)
|
44 |
print(self.output.shape)
|
45 |
self.confidences = {class_names[i]: float(self.output[0, i]) for i in range(3)}
|
|
|
36 |
|
37 |
self.transformed_img = transform(img)
|
38 |
self.input = transform_normalize(self.transformed_img)
|
39 |
+
self.input = self.input.unsqueeze(0)
|
40 |
|
41 |
with torch.no_grad():
|
42 |
+
self.output = self.model(self.input)
|
43 |
self.output = F.softmax(self.output, dim=1)
|
44 |
print(self.output.shape)
|
45 |
self.confidences = {class_names[i]: float(self.output[0, i]) for i in range(3)}
|