jaekookang commited on
Commit
806e6c5
β€’
1 Parent(s): 825e1d8
Files changed (1) hide show
  1. gradio_artist_classifier.py +3 -2
gradio_artist_classifier.py CHANGED
@@ -5,6 +5,7 @@ prototype
5
  ---
6
  - 2022-01-18 jkang first created
7
  '''
 
8
  from PIL import Image
9
  import matplotlib.pyplot as plt
10
  import matplotlib.image as mpimg
@@ -108,7 +109,7 @@ def predict(input_image):
108
  fig.tight_layout()
109
 
110
  buf = io.BytesIO()
111
- fig.savefig(buf, bbox_inces='tight', fotmat='jpg')
112
  buf.seek(0)
113
  pil_img = Image.open(buf)
114
  plt.close()
@@ -132,4 +133,4 @@ iface = gr.Interface(
132
  ],
133
  examples=EXAMPLES,
134
  )
135
- iface.launch(debug=True, enable_queue=True)
 
5
  ---
6
  - 2022-01-18 jkang first created
7
  '''
8
+ from gradcam_utils import get_img_4d_array, make_gradcam_heatmap, align_image_with_heatmap
9
  from PIL import Image
10
  import matplotlib.pyplot as plt
11
  import matplotlib.image as mpimg
 
109
  fig.tight_layout()
110
 
111
  buf = io.BytesIO()
112
+ fig.savefig(buf, bbox_inches='tight', format='jpg')
113
  buf.seek(0)
114
  pil_img = Image.open(buf)
115
  plt.close()
 
133
  ],
134
  examples=EXAMPLES,
135
  )
136
+ iface.launch(debug=True, enable_queue=True)