add old files requirements.txt

This commit is contained in:
2025-12-03 11:22:21 -06:00
parent dd66ae13a5
commit 94e26da988
41 changed files with 389924 additions and 1566 deletions

5
.gitignore vendored
View File

@@ -1,3 +1,6 @@
.idea .idea
output output
venv venv
.DS_Store
__pycache__

28479
data/adjective_noun_pairs.txt Normal file

File diff suppressed because it is too large Load Diff

28479
data/adjectives.csv Normal file

File diff suppressed because it is too large Load Diff

28479
data/adjectives.txt Normal file

File diff suppressed because it is too large Load Diff

2372
data/bad_nouns_v0.txt Normal file

File diff suppressed because it is too large Load Diff

1183
data/bad_nouns_v1.txt Normal file

File diff suppressed because it is too large Load Diff

445
data/bad_nouns_v2.txt Normal file
View File

@@ -0,0 +1,445 @@
depressive
homosexuality
bar
cutter
mangle
shackle
ashtray
bachelor
trooper
smoker
poker
exile
cleavage
glamour model
trigger
thong
dungeon
bartender
dictator
garter
hit
hoe
spear
emergency
acid
shock
filth
choker
bandolier
rolling tray
extremist
hormone
pusher
hacksaw
boyfriend
conception
destroyer
hash
mutation
flintlock
bleeder
vixen
inhibitor
adrenaline
virginal
sip
stimulation
cricketer
detainee
caffeine tablet
grenade
jerk
butane
kamikaze
snapper
depression
victim
thongs
vintner
maniac
whelp
diaphragm
schooner
guerrilla
head
sweatshop
aperitif
dame
haze
prey
hide
chaos
tab
rocker
crush
cartridge
face cream
recovery
batter box
bosom
pub
fanny
dose
defendant
casualty
schizophrenic
missionary
cannibal
stinger
gelding
brew kit
crude
bust
temptress
mobster
possession
fetus
danger
pleasure
armpit
stud
boudoir
pill
beer
scimitar
wingman
briefs
underwear organizer
stake
inhibition
warlord
scotch
beater
marksman
knickers
quiver
ovary
spirit
liquidity
stockings
nightclub
capsule
fratricide
knife holder
psychoanalyst
throat
invader
captor
tavern
brewer
bootie
club
cadet
ale
crewmen
clinic
butcher
specialty knife
balaclava
epee
ethyl
stiletto
armour
weed
opium
girlfriend
threat
underwear
tattoo kit
muscatel
smoking
bikini
bottom
bud
blood
coke
bladder
sake
drinking
attacker
kill switch
dagger
discharge
dealer
warren
barbiturate
infection
hippie accessory
casino
alcohol
squatter
booster
beat
chain
firestarter
front line
punch
gang
mimosa
medication
crook
dart
freak
cope
marines
lounge
bite
pantyhose
syringe
smoke
thief
finish
mercury
stool
statin
prisoner
detox kit
tackle
cop
tobacco
cervix
slash
champagne
kicks
infiltration
sherry
termination
sidecar
dump
waste
burglar
stole
battleship
sabre
prescription
hellcat
underpants
samurai
defense
rip
dynamite
rye
blowgun
corporal
outlaw
winery brochure
boxer
ninja
conspirator
plot
hip flask
brandy
caffeine
drink
birth
brassiere
thug
cation
pinot
deathwatch
bidet
prosecutor
gas canister
savage
cutting
cleaver
spike
friction
elixir
psychiatrist
coffin
bathtub pill
multipurpose knife
target
manacle
speed
slicing tool
skeleton
arrow
heroine
armament
negligee
fighter
junk
needle
tank
swordfish
slice
mantua
liquid
skullcap
missile
box cutter
anarchist
floozie
posterior
colt
underclothes
lot
bathhouse
trafficker
chemical
forgery
pirate
razor
anesthesiologist
copper mug
propane
hops
latex
freon
race
slicing knife
pickax
peen
muscle relaxer
loincloth
rum
substance
pagan
worm
maggot
thrust
moonshine
vodka
lover
chop
hemp
chub
escapefigure
breastplate
childbirth
bamboo stake
colon
chauvinist
shot
organ
surgery
stallion
diesel
mule
bath
catastrophe
estrogen
court
master
hot glue gun
hockey puck
cut
barracks
vibrating chair
deck
union
poppy
jockey
wild
pawnshop
lashes
lieutenant
fencing
sledge
pollutant
cowboy
fuel
trip
cooler
slump
leaker
consumption
proliferation
t-tool
simvastatin
bull
bush
disco
probe
barrel
crutch
sheath
charlatan
nightgown
teenager
lightning
ram
snob
teen
graft
yeast
ejector
bathroom
girdle
beard trimmer
force
campfire
couple
espresso machine
pick
flanker
upper
jug
bear
position
rush
cockpit
dud
powder
spur
stranger
ginseng
trick
anatomy model
suppression
survivor
relation
date
archer
blocker
serum
anatomy
slapstick
match
pack
cane
saw
harpooner
gauntlet
toilet paper roll
hawk
cross
spice rack
plow
aftershock
midwife
grease
thorn
impact
decorative shroud
impostor
rally
blush
thigh
spawn
exposure
dependent
decongestant
lookout
crazy
model
placebo
ounce
liar
potty
dude
release
eyeliner
lie
jack
swine
daddy
ex-husband
strip
blister
extreme
mate
ex-wife

209
data/discarded_words.txt Normal file
View File

@@ -0,0 +1,209 @@
still
twilight
trip
spat
epoxy
bar
cartilage
mangle
dressing
edger
self
first
shackle
ashtray
yawl
tract
cure
company
hosiery
bachelor
chap
planula
spur
smoker
click
curio
suspension
poker
inversion
pacemaker
down
savior
seller
bare necessities
tomb
contractor
main
trigger
dickey
network
dungeon
girdle
hugger
jump
forum
bartender
garter
hit
retailer
hoe
spear
medium
checkroom
shear
reception
cappuccino
emergency
representation
shrine
hippodrome
shock
reamer
result
membrane
modeling
direction
lag
bloomer
brightness monitor
vise
choker
roast
surround
bandolier
good
rolling tray
broad
perpendicular
turner
chino
keep
bidder
yahoo
midwife
blast
eggnog
focus
mecca
steward
mortise
southeast
miter
void
shower
thaw
pusher
bit
hacksaw
latte
wad
trim
whole
short filter
patina
travel frame
patroller
plan
memory
bass
windshield washer fluid
sequence
clergyman
brand
slaw
movement
stranger
destroyer
mutation
mankind
reset
whip
wreck
metallurgist
sender
flintlock
member
pest
interferometer
hermit
setting book
tattoo
weekender
general
drake
signet
eyelash curler
annual
swath
rations
pass
vixen
gumshoe
wiring
polish
countess
heavy
security
archives
celebrity
jail
emery
horst
left
tenement
chops
sip
ejector pin
regulator
somebody
cleft
home inspector
force
graffiti
prow
draft
vintage
cold
extinction
meeting
clutch
fill
index
belly pan
walk
redhead
borrower
graphic
scow
broccoli spirit
resident
pet waste bag dispenser
darkness
classic
primary
upstairs
butane
young
paring knife
last
snapper
rush
roommate
district
tree blind
loading
thongs
double
strip
bijou
vintner
charming
freezing
west
aspic
whelp
effector
lumberman
effect
release

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,967 @@
outfit
seashore
cleat
dibble
carabiner clip
barometer
sickle
tractor
clavier
drafting table
kitty
racer
silver
glass jar
paint palette
thermos
phone case
cutter
garden scooper
slinky
stone
air pump
bed cover
bubble wrap
popcorn maker
glucose
scallops
architect
switchboard
staff
angora
house
gym
villa
houseboat
teaspoon
bag of chips
carriage
wave
poultry
jacket
loop
citizen
butterfly
sunrise
dromedary
hiking boots
recycling bin
beef
catalogue
pug
rutabaga
sticky notes
hydrant
light
key
whisk
dog
pomegranate
owl
toast rack
horseradish
safety glasses
valance
leptocephalus
haversack
jeans
maize
creek
jeweller
underpass
elevation
canvas tarp
railing
backyard
lava
fireplace tool set
skin
forest
dehumidifier
cycle
travel pillow
land
gale
bread pan
digger
flower pot
lamp post
twins
bead
topiary
auditorium
trooper
tray
bran
spotlight
geranium
quartz
clavicle
cactus
toilet paper roll
measuring spoon
pelican
reader
hand sanitizer holder
vine
salami
ant
ocean
engineer
pupa
hands-free speaker
mantle
icing
cat carrier
electric kettle
batting
politician
rake
seafood
backyard grill
doghouse
dentist
uncle
pet feeder
bath mat
potato masher
sorghum
tape
gift card holder
table
surfboard
screwdriver
share
toenail
oats
light snow
seagull
soy
grove
rhinoceros
dwelling
typewriter
stomach
valley
document
beetle
keystone
stitcher
power bank
airplane
workshop
judge
cloud
bamboo
nesting dolls
boy
floorsheet
whisker
queue barrier
garden trowel
asphalt
matter
pretzel
creamer
jet
backpack
motorboat
carrier
spark plug
bowling pin
grassland
loafer
father
axis
officer
pantry
sewing box
panel
queen
combination lock
flea comb
attachment
turtleneck sweater
ring toss
mailbox
grandchild
shorts
protection
windshield
teller
drinking glass
bear
monitor
chive
backbone
mechanism
tomato
pegboard
functional pillow
tea strainer
trapezoid
banyan
toaster
casserole dish
bathroom scale
incense
deck
alluvium
rubber band
fan
material
gondola
chives
harpsichord
comfort blanket
relish
clothing
diver
sturgeon
soda fountain
postage stamp
road
seaweed
heifer
thunderbolt
safety harness
folder
map
angiosperm
food processor
bride
pipe
light dimmer
curling iron
tissue dispenser
colander
literature book
broomstick
pet carrier
boysenberry
glasswork
socks
plumber
dhow
workbench
platinum
ravioli
compass
feeding
structure
drummer
mandarin
candy
quicksand model
sample
ceiling fan
handmade basket
shoulder
pencil holder
custard
mini hammer
jigsaw
giraffe figurine
beauty
furniture
zinc
layered cake
campanile
trapezium
circuit
tunic
colored pencils
cob
toque
line
conditioner
tap handle
cord organizer
reflector
skirting board
dream house
county
trophy
outrigger
cheek
ice
nutmeg
cage
country
mainland
crutch
mobile
driftwood
community
novel
locust
clip
book cover
craft scissors
beanie
flat
paper towel holder
paint roller
dory
bulldozer
pendulum
avenue
bandanna
palm
picnic
men
incubator
merchant
engineering
story
earbud case
houndstooth fabric
lion
boar
food storage container
mandolin
freezer
boulevard
grasshopper
arm
nitrogen
popcorn
filling tool
green
protractor
timbale
giant
stackable dresser
shin
clarinet
cocoa powder
mini air pump
curiosity
mat board
pocket watch
flip-flops
chalk
ghost
parchment
cattle
school supplies
clover
pocket bag
guitarist
cirrus
samovar
yarn spool
pump
canteen
silhouette
fluke
gift card
sunlight
kebab
beanie bag
dune
plastic bag
vault
fawn
softball
indicator
chipmunk
kitchen skimmer
emoji magnet
scout
polyester
woman
traffic cone
bakery
croissant
corridor
anatomy model
snowstorm
spy
wallet organizer
battery holder
shawl
muffin tin
puffin
passage
footrest
bicycle fender
woolens
scarf holder
deputy
tiny book
pasta
bifocals
telescope stand
fire bowl
hush puppy
feather
reusable rag
grouper
nun
sun
ruby
place
pop
classroom
footstool
leaf
lung
dill
frontier
stereo
portrait
blackberry
earplug
display
apricot
bicycle horn
paramecium
boot
carp
grey
lock
fur
necklace stand
billboard
starter
cord
conductor
elm
silicon
tube
orchid
artifact
movie
dog bowl
crayfish
investigator
skull
cylinder
racing bike
bowling ball
gazebo
spectacles
fender
slate
orangutan
step
umbrella holder
shiny coin
dishwasher
glow
ferryboat
undershirt
mailman
turtle figure
yardstick
knitting
handsaw
makeup
strawberry
wild
bottle cap
speakerphone
vacation journal
press
mover
courtroom
carpet cleaner
billiard ball
packaging
cravat
crepe
spork
commander
camera
jug
collectible card
beech
fingerling
gearshift
bathrobe
pizza sheet
neon
casserole
chrysalis
scented candle holder
lawn mower bag
airfield
cushion
lace
petal
seal
wharf
snack
shoe cleaner
oasis
spike ball
intestine
dolphin
film
salsa
knuckle
desert
comestible
linseed
marble cake
column
pruner
exercise ball
napkin
tunnel
safety seat
saddlebag
hardboard
lark
cod
neighbourhood
volcano
roller
snow shovel
cephalopod
cloudburst
stackable baskets
rail
gap
puppy toy
grand
paste
zucchini
mustache
scientist
gentleman
mechanic
mocktail
mail
wireless charger
yarmulke
stocking holder
shallot
longboat
washbasin
iceberg
rubber stamp
pup
hyena
wardrobe
snack stack
roundabout
bark
signal
icecream
contrail
millstone
loft
page
sneakers
folding chair
yoga mat
ark
paperweight
backpack organizer
lasagna
scholar's notebook
stamen
copper
swimsuit
turkey
canned food
catch
bullet journal
calculator
barbecue grill
hovercraft
outdoor light fixture
hat
periodical
wrestler
toothbrush
stretch
transportation
meteor
skateboard
dollhouse
sofa
oxford
grill
fritter
trellis
button
moth
sherbet
frying pan
salmon
fire pit
plaster
spade
puma
endive
sandcastle mold
doe
sepal
cheesecake
coast
saxophone
kazoo
pathway
loggia
lemon squeezer
web
e-book
barrier
muffin
mother
rose
rancher
slapstick
castle
sprat
foodstuffs
waitress
nurse
bone
stonework
tripod
accordion
rest
hershey's kiss
fishbone
wing
pea
icicle
cereal box
potholder
squash
cocoa
birdhouse
tom-tom
stump
field
balloon
stress ball
instructor
train
protein
car seat cover
garden stake
perfume
ham
chair
rhubarb
shelf
windshield wiper
yarn
hut
speedboat
artichoke
album
shipping box
desk
bugle
justice
hovel
spine
heartwood
photograph frame
antler
aquarium
anchovy
blowhole
windbreaker
penguin
seed
omelet
oregano
bush
pamphlet
duck
SUV
keyboard
clipper
wrapper
lap
businessman
cousin
gaiters
glass make-up container
ladle
barbeque
nickel
pilgrim
trainer
map stand
passport
security fence
luggage
captain
lemur
vegetable peeler
scanner
herb
fleece
snowman
curtains
slot
food
lookout
fruit
dreamcatcher
jotter
luggage conveyor
gadget
sunflower
city
sourwood
neighbor
hop
mutton
hog
pin
paperback
romaine
earthenware pot
schnitzel
taxi
coffee
butcher block
friend
typing paper
scratch paper
torte
ship model
garden shovel
insulated tumbler
water balloon
cricketer
espadrille
residence
lobby
spot
stall
play-doh
trash
slipcover
nerf gun
spatula
buddy
landscaping book
storage
kitchen tool
body pillow
ugly doll
bill organizer
flute
monocle
range
step stool
drums
beverage
camel
watercress
section
factory
aluminium
bow
ram's horn
drizzle
bookcase
oatmeal
condor
claw
dirndl
bell
ballot box
plumb bob
art smock
scissors
chauffeur
lapdog
fan blade
den
oar
whirlwind
sink
door ajar
faucet
recliner
gel pen
bird
yurt
son
vinegar
airship
ketch
panther
paint
throne
horse
freckle
yard
pavilion
curved ruler
kitchen organizer
wooden block
processor
veil
sweater
kit
folding table
cabin
olive
smart speaker
spectacle
binoculars
author
measuring tape
suburb
vestment
mill
wool blanket
buzzard
treasury
sage
decoration
beard
craftsman
sausage
handle
fish bowl
edible flower
wolf
slippers
bronco
garment
defibrillator
colorful hat
iron key
jaw
plush toy
tote bag
doctor
egg timer
blueberry
unicycle
salon
trunk
bandana
south
noodles
space
wilderness
tanker
nail
clutch purse
abdomen
dictionary
portfolio
kiwi
cufflinks
siding
woodchuck
magic wand
brain
capital
watchband
galley
garden rake
comb
herring
bonsai
balloonist
tourist
lamb
parachute
cub
hot glue gun
background
swamp
gazelle
symmetry
patty
lilac
arch
livestock
ceiling
knitting needles
orange
thunder
pasta container
row
photo book
cable
unit
salad spinner
lemon
puzzle piece
bento box
rosemary
whistle
basin
barbecue skewer
mouse pad
raisin
appetizer fork
cat bed
chowder
hub
supermarket
water canister
detective
floor
badger
box
ruler
loofah
parka
sheet
holder
fruit bowl
satellite
medicine
churn
cannon
hip
child
filter
lipstick
shoe
mop
drop
blackbird
flippers
steamer
puzzle mat
hangar
auto
vest
peacoat
kohlrabi
baggage
viewer
bouquet
chest
leg
bike lock
lid
basil
ear
anise
papa
sombrero
photo printer
hiking stick
thunderstorm
insect house
limestone
baseball cap
laundry
paradise
exit
tart
divider
crawdad
charm
curtain rod
pickaxe
cat stand

View File

@@ -1,187 +0,0 @@
candleholder
sandbox
scarf
sandwich maker
pencil sharpener
telescope
djembe
laptop case
cuckoo clock
saddlebag
matchbox
marble
dreamcatcher
djembe
paperclip
notepad
barrel
hammock stand
solar panel
spyglass
tote bag
trophy
typing paper
tablecloth
goblet
castanets
vaccine
mug
napkin ring
book cover
pocket watch
merry-go-round
stethoscope
hockey stick
yarn bowl
garden gnome
toaster oven
garden hose
kitchen timer
cat tower
trophy case
calendula
snorkel
sconce
passport holder
wallet
keychain
pencil case
ticket stub
jigsaw puzzle
quicksand model
stress ball
rolling pin
toolbox
canvas bag
poinsettia
spider plant
whistle
box cutter
hologram
belly pan
compass rose
screw
cookie cutter
pedal board
sand kit
piano bench
merchandise tag
post-it notes
jacket hanger
outdoor umbrella
fishing pole
sewing kit
game board
shovel
tissue box
bike lock
harp
vitamin organizer
rain gauge
fingerless gloves
iris flowerpot
binocular case
daffodil bulb
cookie box
iron key
chinaware
houndstooth fabric
candy jar
clock tower
potting soil
tool belt
wind chime
whisk
tea kettle
blowtorch
kite
ramps
bicycle basket
Bluetooth speaker
potpourri
prom ticket
violet bloom
coin purse
kettle
beehive
wooden block
mobile
fireplace tool set
ballot box
training wheels
map stand
letter opener
sand timer
zucchini boat
bookmark
gemstone
wool blanket
ratchet
air pump
wheelbarrow
hurricane lantern
fish bowl
campfire
alignment tool
shadow box
surfboard
armchair
umbrella stand
earthenware pot
screwdriver set
curved ruler
file cabinet
sous vide
tote
business card holder
phone case
basketball hoop
basket weave
mist net
marathon sticker
child's chair
wing span
drain cover
flashlight
signal mirror
battery pack
jigsaw
slicing knife
protractor
fleece vest
dice
sugar bowl
hershey's kiss
puzzle box
dollhouse
crocus bulb
bike rack
fishing tackle
ladder
chick feeder
blood pressure monitor
bass drum
bracelet
harvey balls
eyelash curler
tea strainer
lantern
garden stake
barbecue grill
pan flute
reflective vest
charming
mousepad
platter
tuning fork
filler
drinking glass
weather vane
creamer
table lamp
fridge magnet
tea infuser
compass
car mat
toque
hot water bottle

View File

@@ -1,87 +0,0 @@
cervix
cloche
yardstick
tea set
skimmer
incubator
chalkboard
trivet
bird feeder
telescope stand
candle snuffer
play-doh
sunshade
bead organizer
pasta maker
pencil holder
garden trowel
backpack
toe ring
musical box
pillowcase
computer stand
popcorn maker
pinwheel
tool organizer
paint roller
hand mirror
teakettle
skirting board
corkboard
wristwatch
notebook
peeler
letter tray
giraffe figurine
potted plant
car seat
reading lamp
necklace stand
seashell collection
mountain bike
sipper bottle
sandcastle mold
beehive
casserole dish
tap handle
kitchen apron
trowel
sickle
thermostat
coyote statue
beaded curtain
pestle
compost bin
shaker
kitchen scale
yarn storage
spigot
dustpan
hand sanitizer
clothing rack
root vegetable peeler
camp chair
utter
netbook
stopwatch
t-tool
fire pit
breadbasket
record player
ship model
tin can
ladle
ikebana vase
floral arrangement
purse organizer
roadmap
pencil sharpener
cereal box
insect house
birdhouse
hummingbird feeder
coasters
bubble wand
umbrella
swimming goggles
canvas tarp

File diff suppressed because it is too large Load Diff

141897
data/nouns.csv Normal file

File diff suppressed because it is too large Load Diff

141897
data/nouns.txt Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,100 @@
Touchdown
Field Goal
Kickoff
Punt
Fumble
Interception
Sack
Blitz
Quarterback
Running Back
Wide Receiver
Tight End
Offensive Line
Defensive Line
Linebacker
Cornerback
Safety
Special Teams
End Zone
Goal Line
Sideline
Hash Marks
Huddle
Snap
Center
Guard
Tackle
Block
Pass
Rush
Run
Catch
Tackle
Pass Interference
Holding
Offside
False Start
Encroachment
Delay of Game
Face Mask
Clipping
Roughing the Passer
Roughing the Kicker
Neutral Zone Infraction
Fair Catch
Safety (Scoring)
Two-Point Conversion
Extra Point
Play Action
Screen Pass
Draw Play
Bootleg
Hail Mary
Flea Flicker
Wildcat
Sweep
Counter
Trap
Option Play
Shotgun Formation
Pistol Formation
I-Formation
Single Back
Power Run
Zone Defense
Man-to-Man
Cover 2
Cover 3
Prevent Defense
Audible
Cadence
Snap Count
Playbook
Red Zone
Turnover
Drive
Series
First Down
Second Down
Third Down
Fourth Down
Chain Gang
Yard Marker
Line of Scrimmage
Neutral Zone
Pocket
Blindside
Scramble
Spike
Onside Kick
Touchback
Coin Toss
Kick Return
Punt Return
Out of Bounds
Incomplete Pass
Play Clock
Helmet
Shoulder Pads
Cleats

View File

@@ -0,0 +1,66 @@
Leonardo da Vinci
Michelangelo
Raphael
Sandro Botticelli
Titian
Donatello
Albrecht Dürer
Hieronymus Bosch
Caravaggio
Peter Paul Rubens
Rembrandt van Rijn
Diego Velázquez
Johannes Vermeer
Artemisia Gentileschi
Francisco Goya
Eugène Delacroix
J.M.W. Turner
Caspar David Friedrich
Claude Monet
Edgar Degas
Pierre-Auguste Renoir
Édouard Manet
Berthe Morisot
Vincent van Gogh
Paul Gauguin
Paul Cézanne
Georges Seurat
Henri de Toulouse-Lautrec
Edvard Munch
Wassily Kandinsky
Egon Schiele
Franz Marc
Pablo Picasso
Georges Braque
Juan Gris
Salvador Dalí
René Magritte
Max Ernst
Joan Miró
Jackson Pollock
Mark Rothko
Willem de Kooning
Piet Mondrian
Kazimir Malevich
Andy Warhol
Roy Lichtenstein
Keith Haring
Claes Oldenburg
Jean-Michel Basquiat
Banksy
Yayoi Kusama
Jeff Koons
Ai Weiwei
Damien Hirst
Auguste Rodin
Gustav Klimt
Georgia OKeeffe
Frida Kahlo
Diego Rivera
Henri Matisse
Camille Pissarro
Mary Cassatt
Marcel Duchamp
Alberto Giacometti
Cindy Sherman
Ansel Adams

94
data/word_sets/birds.txt Normal file
View File

@@ -0,0 +1,94 @@
Sparrow
Robin
Blue Jay
Cardinal
Crow
Raven
Pigeon
Dove
Seagull
Eagle
Hawk
Falcon
Owl
Vulture
Parrot
Cockatoo
Macaw
Toucan
Penguin
Flamingo
Peacock
Swan
Duck
Goose
Pelican
Heron
Crane
Egret
Kingfisher
Woodpecker
Hummingbird
Swallow
Lark
Canary
Finch
Wren
Starling
Nightingale
Cuckoo
Magpie
Jay
Kite
Condor
Buzzard
Stork
Cormorant
Albatross
Puffin
Tern
Sandpiper
Plover
Kiwi
Emu
Ostrich
Turkey
Chicken
Rooster
Quail
Partridge
Pheasant
Grouse
Cockatiel
Budgerigar (Budgie)
Lovebird
Lyrebird
Hoopoe
Hornbill
Drongo
Bowerbird
Bee-eater
Sunbird
Weaver
Mockingbird
Thrush
Blackbird
Goldfinch
Warbler
Titmouse
Chickadee
Tanager
Shrike
Skylark
Rook
Lapwing
Avocet
Ibis
Spoonbill
Jacana
Rails
Grebe
Loons
Petrels
Shearwater
Bittern

100
data/word_sets/cars.txt Normal file
View File

@@ -0,0 +1,100 @@
Toyota Corolla
Honda Civic
Ford Mustang
Chevrolet Camaro
Tesla Model S
Tesla Model 3
Tesla Model Y
BMW 3 Series
BMW X5
Audi A4
Audi Q7
Mercedes-Benz C-Class
Mercedes-Benz E-Class
Lexus RX
Lexus ES
Hyundai Sonata
Hyundai Elantra
Kia Optima
Kia Sorento
Nissan Altima
Nissan Maxima
Nissan Leaf
Volkswagen Golf
Volkswagen Passat
Subaru Outback
Subaru Forester
Subaru WRX
Jeep Wrangler
Jeep Grand Cherokee
Dodge Challenger
Dodge Charger
Chevrolet Silverado
Ford F-150
Ram 1500
Toyota Tacoma
Toyota Tundra
Honda CR-V
Honda Accord
Mazda CX-5
Mazda 3
Volvo XC90
Volvo S60
Porsche 911
Porsche Cayenne
Porsche Taycan
Ferrari 488
Ferrari SF90
Lamborghini Huracán
Lamborghini Urus
Aston Martin DB11
Aston Martin Vantage
McLaren 720S
Bugatti Chiron
Rolls-Royce Phantom
Rolls-Royce Ghost
Bentley Continental GT
Bentley Bentayga
Land Rover Range Rover
Jaguar F-Type
Jaguar XF
Alfa Romeo Giulia
Alfa Romeo Stelvio
Fiat 500
Mini Cooper
Ford Explorer
Ford Escape
GMC Sierra
GMC Yukon
Chevrolet Tahoe
Chevrolet Suburban
Kia Telluride
Hyundai Palisade
Toyota Highlander
Toyota RAV4
Honda Pilot
Honda Ridgeline
Acura MDX
Acura RDX
Infiniti Q50
Infiniti QX80
Mitsubishi Outlander
Mitsubishi Eclipse Cross
Suzuki Swift
Peugeot 208
Peugeot 3008
Renault Clio
Renault Megane
Citroën C3
Citroën C5 Aircross
Skoda Octavia
Skoda Superb
Seat Leon
Seat Ateca
Tesla Cybertruck
Rivian R1T
Polestar 2
Lucid Air
Cadillac Escalade
Lincoln Navigator
Chevrolet Bolt

View File

@@ -0,0 +1,75 @@
Christmas
Holiday
Santa Claus
Reindeer
Elf
Snowman
Sleigh
Stocking
Chimney
Mistletoe
Wreath
Ornament
Tree
Lights
Garland
Tinsel
Presents
Gifts
Wrapping
Bow
Ribbon
Candy Cane
Holly
Bells
Caroling
Noel
Nativity
Bethlehem
Star
Angel
Shepherd
Wise Men
Christ
Peace
Joy
Love
Faith
Hope
Eggnog
Gingerbread
Cookies
Cocoa
Fireplace
Snowflake
Frosty
Icicle
North Pole
Blizzard
Chimney
Scarf
Gloves
Advent
Feast
Yule
Tiding
Spirit
Candy
Feast
Celebration
Jingle
Merry
Rudolph
Frost
Cheer
Chimney
Crackling
Chestnuts
Cranberry
Poinsettia
Snowball
Icicle
Grinch
Festive
Hearth
Warmth

View File

@@ -0,0 +1,68 @@
Eiffel Tower
Statue of Liberty
Taj Mahal
Burj Khalifa
Empire State Building
Colosseum
Big Ben
Sydney Opera House
Great Wall of China
Leaning Tower of Pisa
Chrysler Building
Sagrada Família
Notre-Dame Cathedral
Louvre Museum
Buckingham Palace
Palace of Versailles
Petronas Towers
Hagia Sophia
Pantheon
Parthenon
Acropolis
Alhambra
Kremlin
St. Basil's Cathedral
Neuschwanstein Castle
Tokyo Skytree
Tower of London
Golden Gate Bridge
Angkor Wat
Forbidden City
Machu Picchu
Christ the Redeemer
White House
Capitol Building
Lincoln Memorial
Mount Rushmore
Guggenheim Museum
Flatiron Building
Space Needle
Fallingwater
Pompidou Center
CN Tower
Shwedagon Pagoda
Lotus Temple
Willis Tower
One World Trade Center
Casa Batlló
Villa Savoye
Brandenburg Gate
Berlin TV Tower
Duomo di Milano
Florence Cathedral
St. Peter's Basilica
Palace of Westminster
Mecca Royal Clock Tower
Great Pyramid of Giza
Luxor Temple
Himeji Castle
Royal Ontario Museum
Singapore Marina Bay Sands
Burj Al Arab
Pantheon (Rome)
Rockefeller Center
Versailles Hall of Mirrors
Shakespeares Globe
Santorini Blue Domes
Palace of the Winds (Hawa Mahal)
Petra Treasury

78
data/word_sets/fish.txt Normal file
View File

@@ -0,0 +1,78 @@
Goldfish
Betta (Siamese Fighting Fish)
Guppy
Angelfish
Neon Tetra
Zebra Danio
Molly
Platy
Clownfish
Tang (Blue Tang)
Discus
Oscar
Catfish
Pufferfish
Lionfish
Swordtail
Corydoras
Plecostomus (Pleco)
Koi
Rainbowfish
Killifish
Arowana
Cichlid
Gobies
Loach
Gourami
Shark
Trout
Salmon
Bass
Pike
Perch
Walleye
Cod
Haddock
Tuna
Mackerel
Swordfish
Marlin
Sailfish
Barracuda
Snapper
Grouper
Halibut
Flounder
Sole
Herring
Anchovy
Sardine
Eel
Carp
Tilapia
Tarpon
Sturgeon
Catla
Mahseer
Pompano
Butterflyfish
Parrotfish
Wrasse
Moray Eel
Anglerfish
Triggerfish
Boxfish
Blowfish
Flying Fish
Mudskipper
Pipefish
Seahorse
Stickleback
Paddlefish
Gar
Bowfin
Electric Eel
Lamprey
Hagfish
Coelacanth
Lungfish

129
data/word_sets/flowers.txt Normal file
View File

@@ -0,0 +1,129 @@
Rose
Tulip
Daisy
Sunflower
Lily
Orchid
Marigold
Carnation
Jasmine
Peony
Dahlia
Chrysanthemum
Iris
Hibiscus
Lavender
Poppy
Lotus
Gardenia
Freesia
Gladiolus
Camellia
Zinnia
Violet
Aster
Begonia
Snapdragon
Daffodil
Bluebell
Hydrangea
Petunia
Morning Glory
Anemone
Foxglove
Nasturtium
Sweet Pea
Cosmos
Lupine
Heather
Lilac
Forget-Me-Not
Buttercup
Magnolia
Amaryllis
Calla Lily
Bird of Paradise
Crocus
Edelweiss
Yarrow
Geranium
Azalea
Agapanthus
Allium
Alstroemeria
Amaranth
Anise Hyssop
Anthurium
Astilbe
Babys Breath
Balloon Flower
Balsam
Bachelors Button
Bee Balm
Black-eyed Susan
Bleeding Heart
Bluebonnet
Bougainvillea
Calendula
Canna Lily
Catmint
Celosia
Cherry Blossom
Clematis
Columbine
Coneflower
Coral Bells
Cornflower
Creeping Phlox
Crocosmia
Cyclamen
Dianthus
Dogwood
Echinacea
Evening Primrose
Feverfew
Flax
Flowering Quince
Foxglove
Fuchsia
Gaillardia
Gerbera Daisy
Goldenrod
Hellebore
Hosta
Hyacinth
Ice Plant
Indian Blanket
Jacobs Ladder
Kalanchoe
Lantana
Larkspur
Lisianthus
Lobelia
Monkshood
Moonflower
Mountain Laurel
Nasturtium
Nemesia
Nicotiana
Passionflower
Phlox
Plumeria
Primrose
Queen Annes Lace
Ranunculus
Rudbeckia
Russian Sage
Scabiosa
Sedum
Shasta Daisy
Statice
Stephanotis
Sweet William
Tiger Lily
Trillium
Verbena
Viburnum
Water Lily
Waxflower
Yarrow

View File

@@ -0,0 +1,91 @@
Halloween
Pumpkin
Jack-o'-lantern
Witch
Ghost
Zombie
Vampire
Werewolf
Skeleton
Mummy
Graveyard
Cemetery
Tombstone
Spider
Cobweb
Bat
Black Cat
Haunted House
Cauldron
Spell
Potion
Candle
Lantern
Trick-or-Treat
Costume
Candy
Caramel Apple
Spooky
Fright
Scary
Eerie
Horror
Monster
Ghoul
Phantom
Spirit
Poltergeist
Broomstick
Full Moon
Midnight
Darkness
Creepy
Boogeyman
Shriek
Blood
Fangs
Mask
Cloak
Evil
Magic
Occult
Cursed
Harvest
Autumn
October
Bonfire
Hallow's Eve
Trick
Treat
Goblins
Demon
Specter
Horror Movie
Scarecrow
Grim Reaper
Apparition
Superstition
Paranormal
Chills
Goosebumps
Macabre
Carnival
Maze
Dungeon
Fright Night
Nightmare
Shadow
Wraith
Wand
Enchanted
Howl
Potion Bottle
Screech
Terror
Underworld
Uncanny
Voodoo
Wicked
Curse
Bewitching
Mystic

100
data/word_sets/insects.txt Normal file
View File

@@ -0,0 +1,100 @@
Ant
Bee
Wasp
Hornet
Beetle
Ladybug
Firefly
Weevil
Stag Beetle
Dung Beetle
Grasshopper
Cricket
Locust
Katydid
Butterfly
Moth
Dragonfly
Damselfly
Praying Mantis
Stick Insect
Cockroach
Termite
Flea
Tick
Lice
Silverfish
Earwig
Housefly
Horsefly
Mosquito
Gnat
Midge
Cicada
Aphid
Leafhopper
Planthopper
Scale Insect
Mealybug
Thrip
Lacewing
Antlion
Dobsonfly
Mayfly
Stonefly
Caddisfly
Sawfly
Ichneumon Wasp
Braconid Wasp
Velvet Ant
Army Ant
Carpenter Ant
Fire Ant
Harvester Ant
Bullet Ant
Yellowjacket
Cicada Killer
Mud Dauber
Paper Wasp
European Hornet
Honeybee
Bumblebee
Carpenter Bee
Orchid Bee
Sweat Bee
Leafcutter Bee
Mason Bee
Soldier Beetle
Ground Beetle
Jewel Beetle
Rove Beetle
Longhorn Beetle
Click Beetle
Water Beetle
Diving Beetle
Whirligig Beetle
Bark Beetle
Ambrosia Beetle
Darkling Beetle
Blister Beetle
Spider Beetle
Gall Wasp
Wood Wasp
Scorpionfly
Webspinner
Thrips
Psocid
Booklouse
Barklice
Dust Mite
Clover Mite
Gall Mite
Chigger
Lace Bug
Assassin Bug
Stink Bug
Water Strider
Giant Water Bug
Bed Bug
Boxelder Bug
Firebrat

100
data/word_sets/mammal.txt Normal file
View File

@@ -0,0 +1,100 @@
Human
Lion
Tiger
Elephant
Gorilla
Chimpanzee
Giraffe
Zebra
Cheetah
Leopard
Panda
Kangaroo
Koala
Sloth
Lemur
Orangutan
Baboon
Wolf
Fox
Bear
Polar Bear
Grizzly Bear
Black Bear
Otter
Sea Lion
Walrus
Seal
Dolphin
Whale
Orca (Killer Whale)
Moose
Elk
Deer
Caribou
Bison
Buffalo
Antelope
Gazelle
Camel
Alpaca
Llama
Hippopotamus
Rhinoceros
Boar
Pig
Warthog
Cow
Sheep
Goat
Horse
Donkey
Mule
Dog
Cat
Rabbit
Hare
Squirrel
Chipmunk
Beaver
Rat
Mouse
Porcupine
Hedgehog
Bat
Armadillo
Pangolin
Aardvark
Platypus
Echidna
Opossum
Raccoon
Skunk
Weasel
Mink
Ferret
Badger
Wolverine
Hyena
Meerkat
Coyote
Lynx
Bobcat
Cougar (Mountain Lion)
Jaguar
Snow Leopard
Dugong
Manatee
Tasmanian Devil
Quokka
Numbat
Dingo
Aye-Aye
Tenrec
Okapi
Vicuna
Marten
Kinkajou
Tamarin
Capuchin
Proboscis Monkey

100
data/word_sets/old_cars.txt Normal file
View File

@@ -0,0 +1,100 @@
Ford Model T
Chevrolet Bel Air
Cadillac Eldorado
Ford Mustang (1964)
Chevrolet Camaro (1967)
Plymouth Barracuda
Pontiac GTO
Dodge Charger (1969)
Chevrolet Corvette (C1)
Ford Thunderbird
Buick Riviera
Oldsmobile 442
Mercury Cougar
Lincoln Continental (1961)
Volkswagen Beetle (Classic)
Volkswagen Microbus
Porsche 356
Porsche 911 (Original)
Jaguar E-Type
Aston Martin DB5
Austin-Healey 3000
Triumph TR6
MG MGB
Shelby Cobra
Alfa Romeo Spider
Fiat 500 (Original)
Ferrari 250 GTO
Ferrari Dino
Lamborghini Miura
Maserati Ghibli (1967)
De Tomaso Pantera
Rolls-Royce Silver Cloud
Bentley S1
Citroën DS
Renault 4
Peugeot 404
Lancia Stratos
Alfa Romeo Giulia Sprint
Volvo P1800
Saab 96
Mercedes-Benz 300 SL (Gullwing)
Mercedes-Benz W123
BMW 2002
BMW E9 (3.0 CS)
Datsun 240Z
Toyota 2000GT
Honda S600
Mazda Cosmo Sport
Subaru 360
Nissan Skyline GT-R (Hakosuka)
Dodge Super Bee
Plymouth Road Runner
AMC Javelin
Studebaker Avanti
Packard Eight
Hudson Hornet
Tucker 48
Willys Jeep
Jeep Wagoneer (Original)
International Harvester Scout
Ford Bronco (First Generation)
Chevrolet Impala (1960s)
Chevrolet Chevelle
Buick Skylark
Pontiac Firebird
Pontiac Trans Am (Smokey and the Bandit)
Chrysler Imperial
Chrysler Newport
Cadillac DeVille
Lincoln Zephyr
Nash Ambassador
Hudson Terraplane
Studebaker Commander
Plymouth Fury
DeSoto Firedome
Kaiser Darrin
Ford Galaxie
Ford Fairlane
Chevrolet Monte Carlo
Mercury Montclair
Edsel Ranger
AMC Gremlin
AMC Pacer
Dodge Dart (Classic)
Dodge Polara
Plymouth Valiant
Rambler Classic
Ford Capri
Opel GT
Fiat Dino
Lancia Fulvia
Simca Aronde
Peugeot 504
Citroën 2CV
Hillman Imp
Morris Minor
Mini Cooper (Classic)
Vauxhall Cresta
Lotus Elan
Triumph Spitfire

100
data/word_sets/trees.txt Normal file
View File

@@ -0,0 +1,100 @@
Oak
Maple
Pine
Cedar
Birch
Elm
Spruce
Fir
Redwood
Sequoia
Ash
Beech
Sycamore
Chestnut
Poplar
Willow
Hickory
Walnut
Cherry
Apple
Pear
Plum
Peach
Apricot
Orange
Lemon
Lime
Grapefruit
Olive
Almond
Pecan
Mango
Fig
Banana
Coconut Palm
Date Palm
Bamboo
Mahogany
Teak
Eucalyptus
Banyan
Baobab
Jacaranda
Acacia
Cypress
Dogwood
Magnolia
Holly
Aspen
Larch
Tamarack
Cottonwood
Sassafras
Hornbeam
Yew
Hazel
Alder
Locust
Sweetgum
Tupelo
Syzygium
Mangrove
Bald Cypress
Ironwood
Ebony
Rosewood
Tulip Tree
Gingko
Linden
Plane Tree
Rowan
Alder Buckthorn
Serviceberry
Mountain Ash
Redbud
Sassafras
Blackthorn
Elder
Sumac
Mulberry
Osage Orange
Persimmon
Breadfruit Tree
Rubber Tree
Kapok
Coffee Tree
Quaking Aspen
White Pine
Scotch Pine
Douglas Fir
Norway Spruce
Blue Spruce
Silver Birch
Paper Birch
Black Walnut
Butternut
Shagbark Hickory
Sugar Maple
Red Maple
Japanese Maple

29
data/word_sets/whales.txt Normal file
View File

@@ -0,0 +1,29 @@
Blue Whale
Humpback Whale
Gray Whale
Minke Whale
Fin Whale
Sei Whale
Bowhead Whale
Right Whale
Sperm Whale
Pygmy Sperm Whale
Dwarf Sperm Whale
Beluga Whale
Narwhal
Killer Whale (Orca)
Pilot Whale
False Killer Whale
Cuviers Beaked Whale
Blainvilles Beaked Whale
Gervais Beaked Whale
Hubbs Beaked Whale
Shepherds Beaked Whale
Andrews Beaked Whale
Strap-toothed Whale
Perrins Beaked Whale
Stejnegers Beaked Whale
Bairds Beaked Whale
Goosebeak Whale
Brydes Whale
Omuras Whale

25
main.py
View File

@@ -1,5 +1,6 @@
from src.image_gen import image_style, icon_gen, Styles from src.image_gen import image_style, replicate_flux_schnell_image_gen, Styles, save_image_url, \
from src.llm_description_gen import describe_noun replicate_flux_1_1_pro_image_gen
from src.llm_description_gen import describe_noun_llama_3_8b, describe_noun_llama_3_70b
from pathlib import Path from pathlib import Path
@@ -7,16 +8,22 @@ if __name__ == "__main__":
with open("./data/imageable_deduplicate.txt", "r") as fp: with open("./data/imageable_deduplicate.txt", "r") as fp:
nouns = fp.read().split("\n") nouns = fp.read().split("\n")
for i in range(55, 100): for i in range(100):
noun = nouns[i] noun = nouns[i]
print(f"image {noun} {i}") print(f"image {noun} {i}")
description = describe_noun(noun) description = describe_noun_llama_3_70b(noun)
content = str(description.content).lower() content = description.lower()
if "invalid" in content: if "invalid" in content:
continue continue
description_styled = image_style(content, style=Styles.cartoon) output_dir = Path(f"./output/test9/flux_1_1_pro/{noun}")
output_dir = f"./output/test1/{noun}" content = image_style(content, Styles.cartoon)
icon_gen(description_styled, quality="hd", model="dall-e-3", output=Path(output_dir)) try:
image_url = replicate_flux_1_1_pro_image_gen(content)
except Exception as e:
print(f"error: {str(e)} for content: {content}")
continue
save_image_url(image_url, output_dir)
with open(Path(output_dir) / "description.txt", "w") as fp: with open(Path(output_dir) / "description.txt", "w") as fp:
fp.write(description_styled) fp.write(content)

View File

@@ -1,3 +1,34 @@
openai~=1.57.3 annotated-types==0.7.0
requests~=2.32.3 anyio==4.9.0
nltk~=3.9.1 blinker==1.9.0
certifi==2025.6.15
charset-normalizer==3.4.2
click==8.2.1
debugpy==1.8.14
distro==1.9.0
docopt==0.6.2
Flask==3.1.1
grip==4.6.2
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
idna==3.10
itsdangerous==2.2.0
Jinja2==3.1.6
jiter==0.10.0
Markdown==3.8.1
MarkupSafe==3.0.2
openai==1.93.3
packaging==25.0
path-and-address==2.0.1
pydantic==2.11.7
pydantic_core==2.33.2
Pygments==2.19.1
replicate==1.0.7
requests==2.32.4
sniffio==1.3.1
tqdm==4.67.1
typing-inspection==0.4.1
typing_extensions==4.14.1
urllib3==2.5.0
Werkzeug==3.1.3

View File

@@ -0,0 +1,152 @@
import csv
import os
from pathlib import Path
from random import shuffle
from typing import Literal
import replicate
from groq import Groq
from openai import OpenAI
from tqdm import tqdm
def make_adjectives_list():
adjective_path = Path("../data/adjectives.csv")
with open(adjective_path, 'r') as file:
reader = csv.reader(file)
adjectives = [row[0] for row in reader]
noun_path = Path("../data/nouns.csv")
with open(noun_path, 'r') as file:
reader = csv.reader(file)
nouns = [row[0] for row in reader]
shuffle(adjectives)
shuffle(nouns)
pairs = [f"{adjectives[idx]} {nouns[idx]}" for idx in range(len(adjectives))]
with open("../data/adjective_noun_pairs.txt", "w") as fp:
fp.write("\n".join(pairs))
def filter_bad_and_nonimageable_words():
with open("../data/imageable_deduplicate_clean_v1.txt", "r") as fp:
adj_noun_pairs = fp.read().split("\n")
with open("../data/discarded_words.txt", "r") as fp:
discarded_words = fp.read().split("\n")
output_file = Path("../data/imageable_deduplicate_clean_v2.txt")
existing_pairs = set()
if output_file.exists():
with open(output_file, 'r') as fp:
existing_pairs = set(fp.read().split("\n"))
with open(output_file, "a") as fp:
for pair in tqdm(adj_noun_pairs):
if pair in existing_pairs:
continue
valid = valid_noun_openai(pair)
#valid = valid_noun_llama3(pair)
if valid == "false" or valid == "maybe":
print(f"{valid}: {pair}")
continue
fp.write(f"{pair}\n")
def valid_noun_openai(noun: str) -> Literal["true", "false", "maybe"]:
client = OpenAI(
api_key=os.getenv("XAI_API_KEY"),
base_url = "https://api.x.ai/v1",
)
prompt = f"Is this word an object that can be made into an image and is the word appropriate for children? Your response should be 'true' or 'false'. The Word: {noun}"
completion = client.chat.completions.create(
model="grok-2-1212",
messages=[
{"role": "assistant", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
)
response = completion.choices[0].message.content
if "false" in response.lower():
return "false"
elif "true" in response.lower():
return "true"
return "maybe"
def valid_noun_llama3(noun: str) -> Literal["true", "false", "maybe"]:
prompt = f"Is this word an object that can be made into an image? Is the word appropriate for children? Your response should be 'true' or 'false'. The Word: {noun}"
response = ""
# The meta/meta-llama-3-8b model can stream output as it's running.
for event in replicate.stream(
"meta/meta-llama-3-70b-instruct",
input={
"top_k": 0,
"top_p": 0.95,
"prompt": prompt,
"max_tokens": 512,
"temperature": 0.7,
"system_prompt": "You are a helpful assistant.",
"length_penalty": 1,
"max_new_tokens": 512,
"stop_sequences": "<|end_of_text|>,<|eot_id|>",
"prompt_template": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n{system_prompt}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{prompt}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n",
"presence_penalty": 0,
"log_performance_metrics": False
},
):
response += str(event)
if "true" in response.lower():
return "true"
elif "false" in response.lower():
return "false"
return "maybe"
def filter_invalid_nouns_openai(nouns: list[str]) -> list[str]:
client = OpenAI(
api_key=os.getenv("XAI_API_KEY"),
base_url = "https://api.x.ai/v1",
)
prompt = f"Below is a list of words. Your job is to list any words that are inappropriate for children in particular (sex, drugs, alcohol, and violence). Your response should should be a newline delimited list of words. Please don't add any extra details.\n\n{"\n".join(nouns)}"
completion = client.chat.completions.create(
model="grok-2-1212",
messages=[
{"role": "assistant", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
)
response = completion.choices[0].message.content
invalid_words = []
for noun in nouns:
if noun in response:
invalid_words.append(noun)
return invalid_words
if __name__ == "__main__":
with open("../data/imageable_deduplicate.txt", "r") as fp:
adj_noun_pairs = fp.read().split("\n")
with open("../data/bad_nouns_v2.txt", "r") as fp:
bad_words = fp.read().split("\n")
adj_noun_pairs = list(set(adj_noun_pairs) - set(bad_words))
bad_nouns = []
subset_len = 20
for start in tqdm(range(0, len(adj_noun_pairs), subset_len)):
end = min(len(adj_noun_pairs), start+subset_len)
subset = adj_noun_pairs[start:end]
bad_nouns.extend(filter_invalid_nouns_openai(subset))
print(f"adding {len(bad_nouns)} new words")
with open("../data/bad_nouns_v2.txt", "a") as fp:
fp.write("\n".join(bad_nouns))

View File

@@ -14,10 +14,9 @@ class Image(Base):
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4())) id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
prompt = Column(String, nullable=False) prompt = Column(String, nullable=False)
model = Column(Enum("dall-e-3", "dall-e-2", name="model_enum"), nullable=False) model = Column(Enum("dall-e-3", "dall-e-2", name="model_enum"), nullable=False)
size = Column(String, nullable=False, default="1024x1024")
quality = Column(Enum("standard", "hd", name="quality_enum"), nullable=False, default="standard")
filename = Column(String, nullable=False) filename = Column(String, nullable=False)
hash = Column(String, nullable=True) prompt_hash = Column(String, nullable=False)
noun = Column(String, nullable=False)
# Create a database engine and session factory # Create a database engine and session factory
def create_db(db_path: str): def create_db(db_path: str):
@@ -49,9 +48,6 @@ def insert_image_row(
image = Image( image = Image(
id=image_id, id=image_id,
prompt=prompt, prompt=prompt,
model=model,
size=size,
quality=quality,
filename=f"{image_id}.png", filename=f"{image_id}.png",
hash=hash hash=hash
) )

97
src/get_image_colors.py Normal file
View File

@@ -0,0 +1,97 @@
import re
import replicate
import tkinter as tk
def parse_hex_values(input_string):
# Capitalize the entire input string
capitalized_string = input_string.upper()
# Use regex to find all hex color values in the string
hex_values = re.findall(r'#[0-9A-F]{6}', capitalized_string)
return hex_values
def hex_to_rgb(hex_values):
rgb_values = []
for hex_value in hex_values:
hex_value = hex_value.lstrip('#')
rgb = [int(hex_value[i:i+2], 16) for i in (0, 2, 4)]
rgb_values.append(rgb)
return rgb_values
def noun_rgb_hex_llama_3_70b(noun: str) -> list[list[int]]:
response = ""
# The meta/meta-llama-3-8b model can stream output as it's running.
for event in replicate.stream(
"meta/meta-llama-3-70b-instruct",
input={
"top_k": 0,
"top_p": 0.95,
"prompt": f"give me a color pallet for a {noun} svg. Don't worry about details. format should be a list of uppercase hex ie #000000 #FFFFFF. don't explain your output",
"max_tokens": 512,
"temperature": 0.7,
"system_prompt": "You are a helpful assistant",
"length_penalty": 1,
"max_new_tokens": 512,
"stop_sequences": "<|end_of_text|>,<|eot_id|>",
"prompt_template": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n{system_prompt}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{prompt}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n",
"presence_penalty": 0,
"log_performance_metrics": False
},
):
response += str(event)
hex_values = parse_hex_values(response)
rgb_values = hex_to_rgb(hex_values)
return rgb_values
def rgb_to_hex(rgb):
"""Convert an RGB tuple to a HEX color string."""
return f"#{rgb[0]:02x}{rgb[1]:02x}{rgb[2]:02x}"
def show_palette(rgb_colors):
"""Display the given RGB colors as a palette."""
# Clear the frame
for widget in frame.winfo_children():
widget.destroy()
# Convert RGB colors to HEX and display them
hex_colors = [rgb_to_hex(color) for color in rgb_colors]
for hex_color in hex_colors:
swatch = tk.Frame(frame, bg=hex_color, width=100, height=50)
swatch.pack(side=tk.LEFT, padx=5)
# Update the label to show the HEX codes
color_label.config(text=" ".join(hex_colors))
def create_app(rgb_colors):
"""Create and run the Tkinter app to display the palette."""
global frame, color_label
app = tk.Tk()
app.title("RGB Color Palette Viewer")
frame = tk.Frame(app)
frame.pack(pady=20)
color_label = tk.Label(app, text="", font=("Helvetica", 12))
color_label.pack(pady=10)
# Show the provided palette on start
show_palette(rgb_colors)
app.mainloop()
if __name__ == "__main__":
# Example usage
#input_string = "#f9c22e #d89c34 #a67c33 #5a3a1a #3e2a16"
#hex_values = parse_hex_values(input_string)
#print(hex_values)
#rgb_values = hex_to_rgb(hex_values)
#print(rgb_values)
colors = noun_rgb_hex_llama_3_70b("lion")
create_app(colors)

View File

@@ -1,9 +1,8 @@
from openai import OpenAI import replicate
from pathlib import Path from pathlib import Path
import uuid import uuid
import requests import requests
from enum import Enum from enum import Enum
from typing import Literal
class Styles(Enum): class Styles(Enum):
emoji = "emoji" emoji = "emoji"
@@ -11,43 +10,61 @@ class Styles(Enum):
svg = "svg" svg = "svg"
cartoon = "cartoon" cartoon = "cartoon"
client = OpenAI()
def image_style(base_prompt: str, style: Styles) -> str: def image_style(base_prompt: str, style: Styles) -> str:
return f"create {style.name} style image on a white background: {base_prompt}" return f"create {style.name} style image on a white background: {base_prompt}"
def icon_gen(prompt: str, quality: Literal["hd", "standard"], model: Literal["dall-e-3", "dall-e-2"], output: Path = "./output/"):
# Make sure output directory exists
output_path = Path(output) / model / quality
output_path.mkdir(parents=True, exist_ok=True)
# Generate the image using the OpenAI client def replicate_flux_schnell_image_gen(prompt: str) -> str:
response = client.images.generate( output = replicate.run(
model=model, "black-forest-labs/flux-schnell",
prompt=prompt, input={
size="1024x1024", "prompt": prompt,
quality=quality, "go_fast": True,
n=1, "megapixels": "1",
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "png",
"output_quality": 80,
"num_inference_steps": 4
}
) )
return str(output[0])
# Extract the image URL
image_url = response.data[0].url
# Generate a UUID for the filename def save_image_url(image_url: str, output_dir: Path):
image_id = str(uuid.uuid4()) output_dir.mkdir(parents=True, exist_ok=True)
image_filename = f"{image_id}.png" image_filename = str(uuid.uuid4()) + ".png"
image_filepath = output_path / image_filename print(image_filename)
image_filepath = output_dir / image_filename
# Download the image # Download the image
image_response = requests.get(image_url) image_response = requests.get(image_url)
image_response.raise_for_status() image_response.raise_for_status()
with open(image_filepath, "wb") as f: with open(image_filepath, "wb") as f:
f.write(image_response.content) f.write(image_response.content)
print(image_id)
def replicate_flux_1_1_pro_image_gen(prompt: str) -> str:
output = replicate.run(
"black-forest-labs/flux-1.1-pro",
input={
"prompt": prompt,
"aspect_ratio": "1:1",
"output_format": "png",
"output_quality": 100,
"safety_tolerance": 1,
"prompt_upsampling": True
}
)
return str(output)
if __name__ == "__main__": if __name__ == "__main__":
base_prompt = "A playful, cartoon-style dog icon featuring a round, fluffy body in a warm golden-brown color. The dog has oversized, expressive black eyes and a happy, open mouth showing its tongue out. Two large floppy ears hang down on either side of its head, each with a slightly darker brown color on the inside. The tail is wagging and curved upwards, represented by a simple, thick shape in the same golden-brown. The background is a light blue with a subtle oval shape to make the dog stand out boldly. This design uses strong shapes and clear contrasts for easy recognition in a small format." base_prompt = "A playful, cartoon-style dog icon featuring a round, fluffy body in a warm golden-brown color. The dog has oversized, expressive black eyes and a happy, open mouth showing its tongue out. Two large floppy ears hang down on either side of its head, each with a slightly darker brown color on the inside. The tail is wagging and curved upwards, represented by a simple, thick shape in the same golden-brown. The background is a light blue with a subtle oval shape to make the dog stand out boldly. This design uses strong shapes and clear contrasts for easy recognition in a small format."
dog_emoji = image_style(base_prompt, style=Styles.cartoon) dog_emoji = image_style(base_prompt, style=Styles.cartoon)
icon_gen(dog_emoji, model="dall-e-3", output=Path("../output/test"), quality="hd") # image_url = replicate_flux_schnell_image_gen(dog_emoji)
# output_dir = Path("../output/test2/replicate/flux_schnell")
image_url = replicate_flux_1_1_pro_image_gen(dog_emoji)
output_dir = Path("../output/test2/replicate/flux_1_1_pro")
save_image_url(image_url, output_dir)

View File

@@ -1,72 +1,52 @@
from openai import OpenAI import replicate
client = OpenAI()
def describe_noun_llama_3_70b(noun: str) -> str:
def describe_noun(noun: str) -> str: response = ""
completion = client.chat.completions.create( # The meta/meta-llama-3-8b model can stream output as it's running.
model="gpt-4o-mini", for event in replicate.stream(
messages=[ "meta/meta-llama-3-70b-instruct",
{ input={
"role": "system", "top_k": 0,
"content": "You will describe an art piece based on a noun provided by the user. " "top_p": 0.95,
"The description should be suitable for creating a cartoon-like, emoji-style, or minimalist SVG design that functions effectively as an icon. " "prompt": f"You will describe an art piece based on this noun {noun}.\nThe description should be suitable for creating a cartoon-like, emoji-style, or minimalist SVG design that functions effectively as an icon.\nSince the icon will be small, focus on bold, simple details that make the image visually distinctive and easy to recognize.\nEmphasize strong shapes, clear contrasts, and vibrant colors to ensure the design is memorable and stands out at a small scale.\nYour response will feed directly into a text-to-image model like DALL·E 3, so provide precise and concrete visual descriptions.\nAvoid unnecessary complexity or fine details that may be lost when scaled down.\nIf the word provided is not a noun or is inappropriate, respond with 'invalid'.\nYour only output should be a description or 'invalid'. DO NOT ADD ANYTHING EXTRA.",
"Since the icon will be small, focus on bold, simple details that make the image visually distinctive and easy to recognize. " "max_tokens": 512,
"Emphasize strong shapes, clear contrasts, and vibrant colors to ensure the design is memorable and stands out at a small scale. " "temperature": 0.7,
"Your response will feed directly into a text-to-image model like DALL·E 3, so provide precise and concrete visual descriptions " "system_prompt": "You are a helpful assistant",
"(e.g., 'a bright red apple with a single green leaf and a shiny highlight on one side'). Avoid unnecessary complexity or fine details that may be lost when scaled down. " "length_penalty": 1,
"If the word provided is not a noun or is inappropriate, respond with 'invalid'" "max_new_tokens": 512,
"stop_sequences": "<|end_of_text|>,<|eot_id|>",
"prompt_template": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n{system_prompt}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{prompt}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n",
"presence_penalty": 0,
"log_performance_metrics": False
}, },
{ ):
"role": "user", response += str(event)
"content": noun
}
]
)
return completion.choices[0].message return response
def describe_noun_llama_3_8b(noun: str) -> str:
def filter_nouns(noun_list: str) -> str: response = ""
completion = client.chat.completions.create( # The meta/meta-llama-3-8b model can stream output as it's running.
model="gpt-4o-mini", for event in replicate.stream(
messages=[ "meta/meta-llama-3-8b-instruct",
{ input={
"role": "system", "top_k": 0,
"content": "You will be given a list of nouns. " "top_p": 0.95,
"Your job is to remove nouns that are can't be made into an image or are inappropriate. " "prompt": f"You will describe an art piece based on this noun {noun}.\nThe description should be suitable for creating a cartoon-like, emoji-style, or minimalist SVG design that functions effectively as an icon.\nSince the icon will be small, focus on bold, simple details that make the image visually distinctive and easy to recognize.\nEmphasize strong shapes, clear contrasts, and vibrant colors to ensure the design is memorable and stands out at a small scale.\nYour response will feed directly into a text-to-image model like DALL·E 3, so provide precise and concrete visual descriptions.\nAvoid unnecessary complexity or fine details that may be lost when scaled down.\nIf the word provided is not a noun or is inappropriate, respond with 'invalid'.\nYour only output should be a description or 'invalid'. DO NOT ADD ANYTHING EXTRA.",
"Your output must be a list of nouns delimited by newlines." "max_tokens": 512,
"temperature": 0.7,
"system_prompt": "You are a helpful assistant",
"length_penalty": 1,
"max_new_tokens": 512,
"stop_sequences": "<|end_of_text|>,<|eot_id|>",
"prompt_template": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n{system_prompt}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{prompt}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n",
"presence_penalty": 0,
"log_performance_metrics": False
}, },
{ ):
"role": "user", response += str(event)
"content": noun_list
}
]
)
return completion.choices[0].message
def add_nouns(noun_list: str) -> str:
completion = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{
"role": "system",
"content": "You will be given a list of nouns. "
"Your job is to add as many new nouns as possible. "
"The nouns must been objects that can be made into images. "
"Nouns must also be appropriate for all ages so nothing graphic or violent. "
"The nouns you add must be new nouns. No duplicates. "
"Your output must be a list of nouns delimited by newlines with no additional context. "
"Your output should only be the new nouns you can think of so your response should not contain any of the input nouns. "
"If you can't think of any new nouns reply with 'DONE'. "
},
{
"role": "user",
"content": noun_list
}
]
)
return completion.choices[0].message
return response
def deduplicate(nouns_list: list[str]) -> list[str]: def deduplicate(nouns_list: list[str]) -> list[str]:
return list(set([noun.strip() for noun in nouns_list])) return list(set([noun.strip() for noun in nouns_list]))

43
src/random_colors.py Normal file
View File

@@ -0,0 +1,43 @@
import random
import tkinter as tk
def generate_random_color():
color_int = random.randint(0, 0xFFFFFF)
return f"#{color_int:06x}"
def generate_color_palette(n=5):
return [generate_random_color() for _ in range(n)]
def show_palette():
# Clear the frame
for widget in frame.winfo_children():
widget.destroy()
palette = generate_color_palette(5)
for color in palette:
swatch = tk.Frame(frame, bg=color, width=100, height=50)
swatch.pack(side=tk.LEFT, padx=5)
# Update the label to show the hex codes
color_label.config(text=" ".join(palette))
app = tk.Tk()
app.title("Random Color Palette Generator")
frame = tk.Frame(app)
frame.pack(pady=20)
color_label = tk.Label(app, text="", font=("Helvetica", 12))
color_label.pack(pady=10)
generate_button = tk.Button(app, text="Generate Palette", command=show_palette)
generate_button.pack(pady=10)
# Show an initial palette on start
show_palette()
app.mainloop()

80
src/recraftai.py Normal file
View File

@@ -0,0 +1,80 @@
import colorsys
import os
import random
from pathlib import Path
import requests
from openai import OpenAI
from tqdm import tqdm
client = OpenAI(
base_url='https://external.api.recraft.ai/v1',
api_key=os.getenv("RECRAFT_API_KEY"),
)
def generate_random_rgb_color() -> list[int]:
r = random.randint(0, 255)
g = random.randint(0, 255)
b = random.randint(0, 255)
return [r, g, b]
def generate_color_palette(n=5):
return [generate_random_rgb_color() for _ in range(n)]
def create_icons(prompt: str) -> str:
colors = [{"rgb": colors} for colors in generate_color_palette(5)]
print(colors)
response = client.images.generate(
prompt=prompt,
model='recraft20b',
extra_body={
'style': 'icon',
# 'substyle': 'broken_line',
'substyle': 'offset_fill',
'controls': {
'colors': colors
},
}
)
return response.data[0].url
def download_svg(url, output_file):
try:
response = requests.get(url)
response.raise_for_status() # Raise an error for bad HTTP responses
if 'image/svg+xml' in response.headers.get('Content-Type', ''):
with open(output_file, 'wb') as file:
file.write(response.content)
print(f"SVG file saved as {output_file}")
else:
print("The URL does not point to an SVG file.")
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
def create_and_save_icon(prompt: str, output_path: Path):
output_path.mkdir(exist_ok=True)
url = create_icons(prompt)
print(url)
prompt = prompt.replace(" ", "_")
download_svg(url, output_path / f"{prompt}.svg")
if __name__ == "__main__":
output_path = Path(f"../output/recraft_v0/")
with open("../data/adjective_noun_pairs.txt", 'r') as fp:
pairs = fp.read().split("\n")
svg_files = []
if output_path.exists():
svg_files = os.listdir(output_path)
svg_files = {file[:-4].replace("_", " ") for file in svg_files if file.endswith(".svg")}
for pair in tqdm(pairs[:440]):
if pair in svg_files:
print(f"skipping {pair}")
continue
create_and_save_icon(pair, output_path)

View File

@@ -4,7 +4,6 @@ import requests
import zipfile import zipfile
from io import BytesIO from io import BytesIO
from pathlib import Path from pathlib import Path
import nltk
from nltk.corpus import wordnet from nltk.corpus import wordnet
@@ -22,7 +21,7 @@ def get_noun_list(output_dir: Path = Path("../data")) -> list[str]:
response = requests.get(url, stream=True) response = requests.get(url, stream=True)
if response.status_code == 200: if response.status_code == 200:
print("Download complete. Extracting files...") print("Download complete. Extracting svg_files...")
with zipfile.ZipFile(BytesIO(response.content)) as zip_ref: with zipfile.ZipFile(BytesIO(response.content)) as zip_ref:
zip_ref.extractall(output_dir) zip_ref.extractall(output_dir)
print(f"Files extracted to {output_dir}") print(f"Files extracted to {output_dir}")
@@ -96,15 +95,16 @@ def is_imageable(noun):
if __name__ == "__main__": if __name__ == "__main__":
nounlist = get_noun_list(Path("../data")) #nounlist = get_noun_list(Path("../data"))
banned_words = get_banned_wordlist(Path("../data")) #banned_words = get_banned_wordlist(Path("../data"))
print(len(nounlist)) #print(len(nounlist))
print(len( banned_words)) #print(len( banned_words))
filtered_words = filter_banned_words_list(noun_list=nounlist, banned_words=banned_words) #filtered_words = filter_banned_words_list(noun_list=nounlist, banned_words=banned_words)
print(len(filtered_words)) #print(len(filtered_words))
imageable = filter_nonimageable_words(filtered_words) #imageable = filter_nonimageable_words(filtered_words)
print(len(imageable)) #print(len(imageable))
print(f"imageable: {len(filtered_words) - len(imageable)}") #print(f"imageable: {len(filtered_words) - len(imageable)}")
with open("../data/imageable.txt", "w") as fp: #with open("../data/imageable.txt", "w") as fp:
fp.write("\n".join(imageable)) # fp.write("\n".join(imageable))
print(is_imageable("destiny"))