mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 22:25:24 +03:00
switch default limit to 50
This commit is contained in:
parent
56bf05d5ae
commit
602a49ee3d
@ -256,7 +256,7 @@ def events_search():
|
|||||||
query = request.args.get("query", type=str)
|
query = request.args.get("query", type=str)
|
||||||
search_type = request.args.get("search_type", "text", type=str)
|
search_type = request.args.get("search_type", "text", type=str)
|
||||||
include_thumbnails = request.args.get("include_thumbnails", default=1, type=int)
|
include_thumbnails = request.args.get("include_thumbnails", default=1, type=int)
|
||||||
limit = request.args.get("limit", 100, type=int)
|
limit = request.args.get("limit", 50, type=int)
|
||||||
|
|
||||||
# Filters
|
# Filters
|
||||||
cameras = request.args.get("cameras", "all", type=str)
|
cameras = request.args.get("cameras", "all", type=str)
|
||||||
@ -356,7 +356,7 @@ def events_search():
|
|||||||
img = np.array(Image.open(io.BytesIO(thumbnail)).convert("RGB"))
|
img = np.array(Image.open(io.BytesIO(thumbnail)).convert("RGB"))
|
||||||
thumb_result = context.embeddings.thumbnail.query(
|
thumb_result = context.embeddings.thumbnail.query(
|
||||||
query_images=[img],
|
query_images=[img],
|
||||||
n_results=int(limit),
|
n_results=limit,
|
||||||
where=where,
|
where=where,
|
||||||
)
|
)
|
||||||
thumb_ids = dict(zip(thumb_result["ids"][0], thumb_result["distances"][0]))
|
thumb_ids = dict(zip(thumb_result["ids"][0], thumb_result["distances"][0]))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user