Browse Source

Undoing plt close logic as it appears to be breaking Colabs (doh!)

Jason Antic 5 years ago
parent
commit
b1c45227bd
1 changed files with 0 additions and 7 deletions
  1. 0 7
      deoldify/visualize.py

+ 0 - 7
deoldify/visualize.py

@@ -108,11 +108,6 @@ class ModelImageVisualizer:
 
 
         return self._save_result_image(path, result)
         return self._save_result_image(path, result)
 
 
-    def _close_plt(self):
-        plt.cla()
-        plt.clf()
-        plt.close()
-
     def _plot_comparison(
     def _plot_comparison(
         self,
         self,
         figsize: (int, int),
         figsize: (int, int),
@@ -121,7 +116,6 @@ class ModelImageVisualizer:
         orig: Image,
         orig: Image,
         result: Image,
         result: Image,
     ):
     ):
-        self._close_plt()
         fig, axes = plt.subplots(1, 2, figsize=figsize)
         fig, axes = plt.subplots(1, 2, figsize=figsize)
         self._plot_image(
         self._plot_image(
             orig,
             orig,
@@ -145,7 +139,6 @@ class ModelImageVisualizer:
         display_render_factor: bool,
         display_render_factor: bool,
         result: Image,
         result: Image,
     ):
     ):
-        self._close_plt()
         fig, axes = plt.subplots(1, 1, figsize=figsize)
         fig, axes = plt.subplots(1, 1, figsize=figsize)
         self._plot_image(
         self._plot_image(
             result,
             result,