Open kkiskkk opened 1 year ago
Hi, could you please provide a minimum code snippet and a data sample that demonstrate how you obtained the result shown in your screenshot?
Hi,
i have the same issue using the sample from the docs: "Given sentence, rank images" https://clip-as-service.jina.ai/user-guides/client/#rank-api
code:
from docarray import Document
from client.clip_client import Client
c = Client('grpc://172.17.0.2:51000')
# c.profile()
d = Document(
text='a photo of a table',
matches=[
Document(uri='imagexyzsdfdsf'),
Document(uri='imagexyz45435'),
Document(uri='imagexyz68768'),
Document(uri='imagexyz7865756'),
],
)
r = c.rank([d])
**replace image urls
result:
[['', '', '', ''], [0.9542718529701233, 0.0419040322303772, 0.002422966528683901, 0.0014011985622346401]]
found the problem, the docs are using the wrong label in the sample:
print(c.rank(da)['@m', ['text', 'scoresclip_scorevalue']]) print(c.rank(da)['@m', ['uri', 'scoresclip_scorevalue']])
text --> uri
no image name displayed