Spaces:
Running
on
Zero
Running
on
Zero
πwπ
Browse files- app.py +9 -6
- 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 |
-
|
| 38 |
|
| 39 |
-
return images
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
| 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
|