RitaRamo / smallcap

SmallCap: Lightweight Image Captioning Prompted with Retrieval Augmentation
94 stars 20 forks source link

No retrieve_caps function in retrieve_caps.py #3

Closed KyriaAnnwyn closed 2 years ago

KyriaAnnwyn commented 2 years ago

Error in SmallCap_demo.ipynb

NameError Traceback (most recent call last) Cell In [6], line 10 7 with torch.no_grad(): 8 image_embedding = retrieval_model.encode_image(pixel_values_retrieval.unsqueeze(0)).cpu().numpy() ---> 10 nns = retrieve_caps(image_embedding, retrieval_index)[0] 11 caps = [captions[i] for i in nns][:4] 13 # prepare prompt

NameError: name 'retrieve_caps' is not defined

0215Tyj commented 2 years ago

I have the same problem, did you solve it?

YovaKem commented 2 years ago

It's been fixed.