Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
@@ -14,7 +14,7 @@ UNITS = 512
|
|
14 |
|
15 |
|
16 |
# LOADING DATA
|
17 |
-
vocab = pickle.load(open('
|
18 |
|
19 |
tokenizer = tf.keras.layers.TextVectorization(
|
20 |
# max_tokens=VOCABULARY_SIZE,
|
@@ -321,8 +321,8 @@ def get_caption_model():
|
|
321 |
caption_model.decoder(sample_y, sample_enc_out, training=False)
|
322 |
|
323 |
try:
|
324 |
-
caption_model.load_weights('
|
325 |
except FileNotFoundError:
|
326 |
-
caption_model.load_weights('
|
327 |
|
328 |
return caption_model
|
|
|
14 |
|
15 |
|
16 |
# LOADING DATA
|
17 |
+
vocab = pickle.load(open('vocabulary/vocab_coco_1', 'rb'))
|
18 |
|
19 |
tokenizer = tf.keras.layers.TextVectorization(
|
20 |
# max_tokens=VOCABULARY_SIZE,
|
|
|
321 |
caption_model.decoder(sample_y, sample_enc_out, training=False)
|
322 |
|
323 |
try:
|
324 |
+
caption_model.load_weights('model weights/image_captioning_coco_weights.h5')
|
325 |
except FileNotFoundError:
|
326 |
+
caption_model.load_weights('image-captioning-mscoco/model weights/image_captioning_coco_weights.h5')
|
327 |
|
328 |
return caption_model
|