Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -601,7 +601,6 @@ def load_and_preprocess_image(img):
|
|
601 |
|
602 |
def generate_caption_coca(image):
|
603 |
img_processed = load_and_preprocess_image(image)
|
604 |
-
img_processed = np.expand_dims(img_processed, axis=0)
|
605 |
|
606 |
_, cap_features = coca_model.encoder.predict(img_processed, verbose=0)
|
607 |
cap_features = cap_features.astype(np.float32)
|
|
|
601 |
|
602 |
def generate_caption_coca(image):
|
603 |
img_processed = load_and_preprocess_image(image)
|
|
|
604 |
|
605 |
_, cap_features = coca_model.encoder.predict(img_processed, verbose=0)
|
606 |
cap_features = cap_features.astype(np.float32)
|