Spaces:
Running
Running
Sagar Bharadwaj
commited on
Commit
·
3e8f8f6
1
Parent(s):
6df22ad
Updated Utils to accepts cmap
Browse files- colorbynumber/utils.py +6 -2
colorbynumber/utils.py
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
from matplotlib import pyplot as plt
|
2 |
|
3 |
-
def show_image(image):
|
4 |
-
|
|
|
|
|
|
|
5 |
plt.axis('off')
|
6 |
plt.show()
|
|
|
|
1 |
from matplotlib import pyplot as plt
|
2 |
|
3 |
+
def show_image(image, cmap = None):
|
4 |
+
if cmap:
|
5 |
+
plt.imshow(image, cmap = cmap)
|
6 |
+
else:
|
7 |
+
plt.imshow(image)
|
8 |
plt.axis('off')
|
9 |
plt.show()
|
10 |
+
|