Spaces:
Runtime error
Runtime error
Commit
·
7957de1
1
Parent(s):
fe53098
Upload app.py
Browse files
app.py
CHANGED
|
@@ -48,9 +48,9 @@ model= model.to(device)
|
|
| 48 |
template = open('src/template.txt').read().strip() + ' '
|
| 49 |
|
| 50 |
# precompute captions for retrieval
|
| 51 |
-
captions = json.load(open('
|
| 52 |
retrieval_model, feature_extractor_retrieval = clip.load("RN50x64", device=device)
|
| 53 |
-
retrieval_index = faiss.read_index('
|
| 54 |
#res = faiss.StandardGpuResources()
|
| 55 |
#retrieval_index = faiss.index_cpu_to_gpu(res, 0, retrieval_index)
|
| 56 |
|
|
|
|
| 48 |
template = open('src/template.txt').read().strip() + ' '
|
| 49 |
|
| 50 |
# precompute captions for retrieval
|
| 51 |
+
captions = json.load(open('coco_index_captions.json'))
|
| 52 |
retrieval_model, feature_extractor_retrieval = clip.load("RN50x64", device=device)
|
| 53 |
+
retrieval_index = faiss.read_index('coco_index')
|
| 54 |
#res = faiss.StandardGpuResources()
|
| 55 |
#retrieval_index = faiss.index_cpu_to_gpu(res, 0, retrieval_index)
|
| 56 |
|