kai-sheng commited on
Commit
58f886c
·
verified ·
1 Parent(s): db429ce

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -10,7 +10,7 @@ from keras.preprocessing.sequence import pad_sequences
10
 
11
  app = Flask(__name__)
12
 
13
- MAX_LENGTH = 34
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.h5')
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)