-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmetadata.json
31 lines (31 loc) · 1002 Bytes
/
metadata.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"title": "Faucet Finder",
"description": "Using embeddings to find faucets that look similar.",
"databases": {
"faucets": {
"queries": {
"sample": {
"hide_sql": true,
"sql": "SELECT e.id, f.image_url, f.product_url FROM embeddings e JOIN faucets f ON e.id = f.embedding_id ORDER BY RANDOM() LIMIT 9;"
},
"similar": {
"hide_sql": true,
"sql": "SELECT * FROM (SELECT *, ROW_NUMBER() OVER (PARTITION by brand ORDER BY title) AS rn FROM (WITH related AS (SELECT value FROM json_each(faiss_search('faucets', 'embeddings', (SELECT embedding FROM embeddings WHERE id = :input_faucet), 200))) SELECT * FROM related, faucets WHERE related.value = faucets.embedding_id) as similar) WHERE rn = 1"
}
}
}
},
"plugins": {
"datasette-faiss": {
"tables": [
[
"faucets",
"embeddings"
]
]
},
"datasette-scale-to-zero": {
"duration": "10m"
}
}
}