remove debug code and fix import

This commit is contained in:
Jason Hunter 2024-06-12 00:07:42 -04:00
parent 53c0a2a7e8
commit a1fea82409
2 changed files with 2 additions and 8 deletions

View File

@ -1,4 +1,5 @@
import faulthandler
import sys
import threading
from flask import cli

View File

@ -3,7 +3,6 @@
import base64
import io
import logging
import os
import threading
from multiprocessing.synchronize import Event as MpEvent
from typing import Optional
@ -165,13 +164,7 @@ class EmbeddingMaintainer(threading.Thread):
ids=[event.id],
)
base_dir = f"/tmp/ai/{event.id}"
os.makedirs(base_dir, exist_ok=True)
for index, thumbnail in enumerate(thumbnails):
with open(f"{base_dir}/{index}.jpg", "wb") as f:
f.write(thumbnail)
logger.info(
logger.debug(
"Generated description for %s (%d images): %s",
event.id,
len(thumbnails),