site updates

This commit is contained in:
2024-03-08 10:25:58 -07:00
parent 30f797d0a9
commit 2cbe90a9b8
9 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import csv
import random
def read_seeds(filename):
seeds = {}
with open(filename, newline='') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
category = row['Category']
seed = row['Seed']
if category not in seeds:
seeds[category] = []
seeds[category].append(seed)
return seeds
def generate_prompt(seeds):
prompt_parts = [random.choice(seeds[category]) for category in seeds]
return f"A wallpaper with a {' '.join(prompt_parts)}."
# Reading seeds from a CSV file and generating a prompt
seeds = read_seeds('seeds.csv')
print(generate_prompt(seeds))