Spaces:
Running
Running
Commit
•
855dbc0
1
Parent(s):
50b5946
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def predict(images, eps):
|
|
24 |
zca = K.enhance.ZCAWhitening(eps=eps, compute_inv=True)
|
25 |
zca.fit(images)
|
26 |
zca_images = zca(images)
|
27 |
-
grid_zca = make_grid(zca_images, nrow=
|
28 |
return np.transpose(grid_zca,[1,2,0])
|
29 |
|
30 |
title = 'ZCA Whitening with Kornia!'
|
@@ -50,7 +50,7 @@ iface = gr.Interface(fn=predict,
|
|
50 |
'Carnation.jpg',
|
51 |
'Orchid.jpg',
|
52 |
'Peony.jpg'
|
53 |
-
], 0.
|
54 |
)
|
55 |
|
56 |
if __name__ == "__main__":
|
|
|
24 |
zca = K.enhance.ZCAWhitening(eps=eps, compute_inv=True)
|
25 |
zca.fit(images)
|
26 |
zca_images = zca(images)
|
27 |
+
grid_zca = make_grid(zca_images, nrow=3, normalize=True).cpu().numpy()
|
28 |
return np.transpose(grid_zca,[1,2,0])
|
29 |
|
30 |
title = 'ZCA Whitening with Kornia!'
|
|
|
50 |
'Carnation.jpg',
|
51 |
'Orchid.jpg',
|
52 |
'Peony.jpg'
|
53 |
+
], 0.1]]
|
54 |
)
|
55 |
|
56 |
if __name__ == "__main__":
|