mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 17:17:40 +03:00
clean up
This commit is contained in:
parent
2495e4d7c3
commit
497a54ad2a
@ -334,7 +334,7 @@ class Embeddings:
|
|||||||
.paginate(current_page, batch_size)
|
.paginate(current_page, batch_size)
|
||||||
)
|
)
|
||||||
|
|
||||||
while len(events) > 0:
|
while events:
|
||||||
event: Event
|
event: Event
|
||||||
batch_thumbs = {}
|
batch_thumbs = {}
|
||||||
batch_descs = {}
|
batch_descs = {}
|
||||||
@ -345,16 +345,13 @@ class Embeddings:
|
|||||||
batch_descs[event.id] = description
|
batch_descs[event.id] = description
|
||||||
totals["descriptions"] += 1
|
totals["descriptions"] += 1
|
||||||
|
|
||||||
thumbnail = get_event_thumbnail_bytes(event)
|
if thumbnail := get_event_thumbnail_bytes(event):
|
||||||
|
batch_thumbs[event.id] = thumbnail
|
||||||
if thumbnail is None:
|
totals["thumbnails"] += 1
|
||||||
continue
|
|
||||||
|
|
||||||
batch_thumbs[event.id] = thumbnail
|
|
||||||
totals["thumbnails"] += 1
|
|
||||||
|
|
||||||
# run batch embedding
|
# run batch embedding
|
||||||
self.batch_embed_thumbnail(batch_thumbs)
|
if batch_thumbs:
|
||||||
|
self.batch_embed_thumbnail(batch_thumbs)
|
||||||
|
|
||||||
if batch_descs:
|
if batch_descs:
|
||||||
self.batch_embed_description(batch_descs)
|
self.batch_embed_description(batch_descs)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user