Arijit-hazra commited on
Commit
9091369
1 Parent(s): bfb6a0f

trying if the model returned by build is none or not

Browse files
Files changed (1) hide show
  1. load_model.py +2 -2
load_model.py CHANGED
@@ -321,7 +321,6 @@ def build():
321
  token_meta = pickle.load(open(filename, 'rb'))
322
  tokenizer = tf.keras.layers.TextVectorization.from_config(token_meta["config"])
323
  tokenizer.set_weights(token_meta['weights'])
324
- print(tokenizer("bulid sentence"))
325
  word_to_index = tf.keras.layers.StringLookup(
326
  mask_token="",
327
  vocabulary=tokenizer.get_vocabulary())
@@ -345,10 +344,11 @@ def build():
345
  image_url = 'https://tensorflow.org/images/surf.jpg'
346
  image_path = tf.keras.utils.get_file('surf.jpg', origin=image_url)
347
  image = load_image(image_path)
348
- load_model.simple_gen(image)
349
 
350
  path = "model/captioner_weights"
351
  load_model.load_weights(path)
 
352
  return load_model
353
 
354
  # loaded_model = build()
 
321
  token_meta = pickle.load(open(filename, 'rb'))
322
  tokenizer = tf.keras.layers.TextVectorization.from_config(token_meta["config"])
323
  tokenizer.set_weights(token_meta['weights'])
 
324
  word_to_index = tf.keras.layers.StringLookup(
325
  mask_token="",
326
  vocabulary=tokenizer.get_vocabulary())
 
344
  image_url = 'https://tensorflow.org/images/surf.jpg'
345
  image_path = tf.keras.utils.get_file('surf.jpg', origin=image_url)
346
  image = load_image(image_path)
347
+ print(load_model.simple_gen(image))
348
 
349
  path = "model/captioner_weights"
350
  load_model.load_weights(path)
351
+ print(load_model.simple_gen(image))
352
  return load_model
353
 
354
  # loaded_model = build()