prompt_search_engine / core /initialization.py
krstakis's picture
fixed imports
a05ed2c
raw
history blame
454 Bytes
import dill
from data.dataset import PromptDataset
from search_engine import PromptSearchEngine
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("engine.pickle", "wb") as file:
file.write(serialized_engine)
run()