Spaces:
Runtime error
Runtime error
PedroMartelleto
commited on
Commit
•
7736fa8
1
Parent(s):
ffd57e9
small fixes
Browse files
app.py
CHANGED
@@ -12,15 +12,12 @@ import torch
|
|
12 |
import numpy as np
|
13 |
|
14 |
class Explainer:
|
15 |
-
def __init__(self, model):
|
16 |
-
self.model = model
|
17 |
-
self.default_cmap = LinearSegmentedColormap.from_list('custom blue',
|
18 |
-
[(0, '#ffffff'),
|
19 |
-
(0.25, '#000000'),
|
20 |
-
(1, '#000000')], N=256)
|
21 |
-
|
22 |
def __init__(self, model, img, class_names):
|
23 |
self.model = model
|
|
|
|
|
|
|
|
|
24 |
self.class_names = class_names
|
25 |
|
26 |
transform = transforms.Compose([
|
|
|
12 |
import numpy as np
|
13 |
|
14 |
class Explainer:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
def __init__(self, model, img, class_names):
|
16 |
self.model = model
|
17 |
+
self.default_cmap = LinearSegmentedColormap.from_list('custom blue',
|
18 |
+
[(0, '#ffffff'),
|
19 |
+
(0.25, '#000000'),
|
20 |
+
(1, '#000000')], N=256)
|
21 |
self.class_names = class_names
|
22 |
|
23 |
transform = transforms.Compose([
|