Skip to content

Commit 5cfe7c3

Browse files
fix visualization (#2453)
1 parent 96c3de8 commit 5cfe7c3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

keras_cv/src/visualization/plot_image_gallery.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ def plot_image_gallery(
175175
current_axis.margins(x=0, y=0)
176176
current_axis.axis("off")
177177

178-
if path is None and show is None:
179-
return fig
180-
181178
if path is not None:
182179
plt.savefig(
183180
fname=path,
@@ -190,3 +187,5 @@ def plot_image_gallery(
190187
elif show:
191188
plt.show()
192189
plt.close()
190+
else:
191+
return fig

0 commit comments

Comments
 (0)