Jyothirmai
commited on
Commit
•
619e8cc
1
Parent(s):
e936ab6
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,6 @@ def generate_caption_cnnrnn(image):
|
|
27 |
with open('Image_features_ecoder_decoder.pickle', 'rb') as f:
|
28 |
Xnet_features = pickle.load(f)
|
29 |
image = Xnet_features[image]
|
30 |
-
print(image.shape)
|
31 |
caption = cnnrnn.get_result(image)
|
32 |
return caption
|
33 |
|
@@ -75,6 +74,7 @@ def predict(img, model_name, max_tokens, temperature, imgID):
|
|
75 |
return generate_caption_vitCoAtt(img), getCaption(imgID)
|
76 |
elif model_name == "Baseline Model CNN-RNN":
|
77 |
img = getImageID(imgID)
|
|
|
78 |
return generate_caption_cnnrnn(img), getCaption(imgID)
|
79 |
else:
|
80 |
return "select a model","select an image"
|
|
|
27 |
with open('Image_features_ecoder_decoder.pickle', 'rb') as f:
|
28 |
Xnet_features = pickle.load(f)
|
29 |
image = Xnet_features[image]
|
|
|
30 |
caption = cnnrnn.get_result(image)
|
31 |
return caption
|
32 |
|
|
|
74 |
return generate_caption_vitCoAtt(img), getCaption(imgID)
|
75 |
elif model_name == "Baseline Model CNN-RNN":
|
76 |
img = getImageID(imgID)
|
77 |
+
print(img)
|
78 |
return generate_caption_cnnrnn(img), getCaption(imgID)
|
79 |
else:
|
80 |
return "select a model","select an image"
|