annie08 commited on
Commit
4876f0e
·
1 Parent(s): 46ff477

changed model

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. model.h5 → model_9.h5 +2 -2
app.py CHANGED
@@ -12,14 +12,14 @@ mobilenet_model = MobileNetV2(weights="imagenet")
12
  mobilenet_model = Model(inputs=mobilenet_model.inputs, outputs=mobilenet_model.layers[-2].output)
13
 
14
  # Load the trained captioning model
15
- model = tf.keras.models.load_model("model.h5")
16
 
17
  # Load the tokenizer
18
  with open("tokenizer.pkl", "rb") as tokenizer_file:
19
  tokenizer = pickle.load(tokenizer_file)
20
 
21
  # Set maximum caption length and start/end tokens
22
- max_caption_length = 34 # Adjust based on your model's training
23
  start_token = "startseq"
24
  end_token = "endseq"
25
 
 
12
  mobilenet_model = Model(inputs=mobilenet_model.inputs, outputs=mobilenet_model.layers[-2].output)
13
 
14
  # Load the trained captioning model
15
+ model = tf.keras.models.load_model("model_9.h5")
16
 
17
  # Load the tokenizer
18
  with open("tokenizer.pkl", "rb") as tokenizer_file:
19
  tokenizer = pickle.load(tokenizer_file)
20
 
21
  # Set maximum caption length and start/end tokens
22
+ max_caption_length = 33 # Adjust based on your model's training
23
  start_token = "startseq"
24
  end_token = "endseq"
25
 
model.h5 → model_9.h5 RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cb1a443930ca12dd53d86d79d2102a1d34bcf225ae7c2bceb3ba4cf4db6dc15c
3
- size 85587336
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f851e1217ac2ccfe1166ff5848da48905b98c1883076d63a6b5d00871d4c49e
3
+ size 16970992