prompt_search_engine / core /initialization.py
krstakis's picture
pickle save directiory changed
290b57e
raw
history blame
470 Bytes
import dill
from core.search_engine import PromptSearchEngine
from core.data.dataset import PromptDataset
def run():
"""
TODO
"""
prompt_dataset = PromptDataset("Gustavosta/Stable-Diffusion-Prompts")
prompt_dataset.load()
prompts = prompt_dataset.get_prompts()
engine = PromptSearchEngine(prompts)
serialized_engine = dill.dumps(engine)
with open("core/engine.pickle", "wb") as file:
file.write(serialized_engine)
run()