not-lain commited on
Commit
e54bf1d
β€’
1 Parent(s): 9a53af3

🌘wπŸŒ–

Browse files
Files changed (2) hide show
  1. app.py +9 -6
  2. charmander.jpg +0 -0
app.py CHANGED
@@ -32,13 +32,16 @@ def search(query: str, k: int = 4):
32
  k=k, # get only top k results
33
  )
34
  images = retrieved_examples["image"]
35
- labels = {}
36
- for i in range(k):
37
- labels[retrieved_examples["text"][i]] = scores[i]
38
 
39
- return images, labels
40
 
41
-
42
- demo = gr.Interface(search, inputs="image", outputs=["gallery", "label"])
 
 
 
43
 
44
  demo.launch(debug=True)
 
32
  k=k, # get only top k results
33
  )
34
  images = retrieved_examples["image"]
35
+ # labels = {}
36
+ # for i in range(k):
37
+ # labels[retrieved_examples["text"][k-i]] = scores[k-i]
38
 
39
+ return images #, labels
40
 
41
+ demo = gr.Interface(search, inputs="image", outputs=["gallery"
42
+ #, "label"
43
+ ],
44
+ examples=[("./charmander.jpg",)],
45
+ )
46
 
47
  demo.launch(debug=True)
charmander.jpg ADDED