Spaces:
Sleeping
Sleeping
File size: 457 Bytes
8a0c27f 63a3ec4 8a0c27f 63a3ec4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import dill
from .search_engine import PromptSearchEngine
from .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("engine.pickle", "wb") as file:
file.write(serialized_engine)
run()
|