Update main.py
Browse files
main.py
CHANGED
@@ -10,7 +10,7 @@ from keras.preprocessing.sequence import pad_sequences
|
|
10 |
|
11 |
app = Flask(__name__)
|
12 |
|
13 |
-
MAX_LENGTH =
|
14 |
|
15 |
def extract_features(image_data, model):
|
16 |
try:
|
@@ -66,7 +66,7 @@ def generate_caption():
|
|
66 |
image_data = base64.b64decode(base64_image_data)
|
67 |
|
68 |
tokenizer = load(open("tokenizer.p","rb"))
|
69 |
-
model = load_model('model_9.
|
70 |
|
71 |
xception_model = Xception(include_top=False, pooling="avg")
|
72 |
photo = extract_features(image_data, xception_model)
|
|
|
10 |
|
11 |
app = Flask(__name__)
|
12 |
|
13 |
+
MAX_LENGTH = 38
|
14 |
|
15 |
def extract_features(image_data, model):
|
16 |
try:
|
|
|
66 |
image_data = base64.b64decode(base64_image_data)
|
67 |
|
68 |
tokenizer = load(open("tokenizer.p","rb"))
|
69 |
+
model = load_model('model_9.keras')
|
70 |
|
71 |
xception_model = Xception(include_top=False, pooling="avg")
|
72 |
photo = extract_features(image_data, xception_model)
|