changed model
Browse files- app.py +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("
|
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 =
|
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:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9f851e1217ac2ccfe1166ff5848da48905b98c1883076d63a6b5d00871d4c49e
|
3 |
+
size 16970992
|