jaekookang commited on
Commit
c9b69b7
β€’
1 Parent(s): 57064d0

update minor

Browse files
gradio_artist_classifier.py CHANGED
@@ -27,8 +27,10 @@ from gradcam_utils import get_img_4d_array, make_gradcam_heatmap, align_image_wi
27
  # ---------- Settings ----------
28
  ARTIST_META = 'artist.json'
29
  TREND_META = 'trend.json'
30
- EXAMPLES = ['monet.jpg']
31
  ALPHA = 0.9
 
 
32
 
33
  # ---------- Logging ----------
34
  logger.add('app.log', mode='a')
@@ -59,7 +61,7 @@ def resize_image(img_array, width, height):
59
 
60
  def predict(input_image):
61
  img_3d_array = load_image_as_array(input_image)
62
- img_3d_array = resize_image(img_3d_array)
63
  img_4d_array = img_3d_array[np.newaxis,...]
64
  logger.info(f'--- {input_image} loaded')
65
 
 
27
  # ---------- Settings ----------
28
  ARTIST_META = 'artist.json'
29
  TREND_META = 'trend.json'
30
+ EXAMPLES = ['monet2.jpg', 'picasso.jpeg', 'lichtenstein_popart.jpg']
31
  ALPHA = 0.9
32
+ IMG_WIDTH = 299
33
+ IMG_HEIGHT = 299
34
 
35
  # ---------- Logging ----------
36
  logger.add('app.log', mode='a')
 
61
 
62
  def predict(input_image):
63
  img_3d_array = load_image_as_array(input_image)
64
+ img_3d_array = resize_image(img_3d_array, IMG_WIDTH, IMG_HEIGHT)
65
  img_4d_array = img_3d_array[np.newaxis,...]
66
  logger.info(f'--- {input_image} loaded')
67
 
lichtenstein_popart.jpg ADDED
monet2.jpg ADDED
monet3.jpg ADDED
picasso.jpeg ADDED