JairoDanielMT commited on
Commit
8b19901
verified
1 Parent(s): dc01faa

Upload 5 files

Browse files
Files changed (5) hide show
  1. .gitignore +13 -0
  2. Dockerfile +16 -0
  3. categories.json +1384 -0
  4. main.py +172 -0
  5. pyproject.toml +13 -0
.gitignore ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+ .ruff_cache
12
+ app.log
13
+ cache.pkl
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Usa una imagen base de Python
2
+ FROM python:3.11-slim
3
+
4
+ # Establece el directorio de trabajo
5
+ WORKDIR /code
6
+
7
+ # Copia y instala las dependencias
8
+ COPY ./requirements.txt /code/requirements.txt
9
+ RUN pip install uv
10
+ RUN uv sync
11
+
12
+ # Copia el resto de los archivos de la aplicaci贸n
13
+ COPY . .
14
+
15
+ # Comando para ejecutar la aplicaci贸n
16
+ CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
categories.json ADDED
@@ -0,0 +1,1384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tipo": [
3
+ "human",
4
+ "elf",
5
+ "fairy",
6
+ "mermaid",
7
+ "angel",
8
+ "demon",
9
+ "furry",
10
+ "robot",
11
+ "alien",
12
+ "cyborg",
13
+ "vampire",
14
+ "werewolf",
15
+ "ghost",
16
+ "zombie",
17
+ "golem",
18
+ "witch",
19
+ "wizard",
20
+ "centaur",
21
+ "dragon",
22
+ "phoenix",
23
+ "griffin",
24
+ "unicorn",
25
+ "nymph",
26
+ "giant",
27
+ "dwarf",
28
+ "orc",
29
+ "troll",
30
+ "satyr",
31
+ "sphinx",
32
+ "djinn",
33
+ "yokai",
34
+ "kitsune",
35
+ "tanuki",
36
+ "kraken",
37
+ "sea serpent",
38
+ "pegasus",
39
+ "chimera",
40
+ "minotaur",
41
+ "harpy",
42
+ "banshee",
43
+ "elemental",
44
+ "genie",
45
+ "shadow entity",
46
+ "clockwork automaton",
47
+ "biomechanical creature",
48
+ "artificial intelligence",
49
+ "hologram entity",
50
+ "digital avatar",
51
+ "android",
52
+ "mutant",
53
+ "shape-shifter",
54
+ "necromancer",
55
+ "fallen angel",
56
+ "celestial being",
57
+ "living statue",
58
+ "time traveler",
59
+ "parallel universe counterpart",
60
+ "alternate timeline variant",
61
+ "dimension hopper",
62
+ "plasma being",
63
+ "fire spirit",
64
+ "water spirit",
65
+ "earth spirit",
66
+ "air spirit",
67
+ "starborn entity",
68
+ "void creature",
69
+ "dreamwalker",
70
+ "nightmare creature",
71
+ "soul reaper",
72
+ "timekeeper",
73
+ "lunar guardian",
74
+ "solar guardian",
75
+ "ethereal wisp",
76
+ "crystal being",
77
+ "hive mind entity",
78
+ "symbiotic creature",
79
+ "living weapon",
80
+ "cosmic horror",
81
+ "eldritch entity",
82
+ "celestial dragon",
83
+ "ancient deity",
84
+ "primordial being",
85
+ "living shadow",
86
+ "energy being",
87
+ "cloud spirit",
88
+ "storm elemental",
89
+ "lava creature",
90
+ "ice spirit",
91
+ "forest guardian",
92
+ "desert wanderer",
93
+ "sea guardian",
94
+ "mountain sentinel",
95
+ "robot animal hybrid",
96
+ "mechanical dragon",
97
+ "cybernetic wolf",
98
+ "nanobot swarm",
99
+ "holographic projection",
100
+ "living hologram",
101
+ "quantum entity",
102
+ "dimensional rift dweller",
103
+ "space pirate",
104
+ "starship AI",
105
+ "cosmic wanderer",
106
+ "universal observer",
107
+ "galactic envoy",
108
+ "orbital sentinel",
109
+ "planetary guardian",
110
+ "nebula entity",
111
+ "supernova avatar",
112
+ "wormhole traveler",
113
+ "living constellation",
114
+ "stellar being",
115
+ "voidwalker",
116
+ "black hole sentinel",
117
+ "galactic explorer",
118
+ "dimension splitter",
119
+ "interdimensional trader",
120
+ "energy construct",
121
+ "matter manipulator",
122
+ "anti-matter entity",
123
+ "zero-point energy being"
124
+ ],
125
+ "sexo": [
126
+ "1boy",
127
+ "1girl",
128
+ "futanari",
129
+ "male",
130
+ "female",
131
+ "futanari",
132
+ "demiboy",
133
+ "demigirl",
134
+ "two-spirit",
135
+ "alien gender concept",
136
+ "mechanical construct (no gender)",
137
+ "animalistic gender",
138
+ "anthropomorphic male",
139
+ "anthropomorphic female",
140
+ "hermaphroditic alien",
141
+ "monogendered species",
142
+ "polygendered species",
143
+ "spiritual essence (no physical gender)",
144
+ "cyborg male",
145
+ "cyborg female",
146
+ "synthetic gender",
147
+ "gender created through artificial means",
148
+ "shapeshifter male",
149
+ "shapeshifter female",
150
+ "gender shifter",
151
+ "mythological male",
152
+ "mythological female",
153
+ "demonic male",
154
+ "demonic female",
155
+ "angelic male",
156
+ "angelic female",
157
+ "elemental male",
158
+ "elemental female",
159
+ "hybrid gender",
160
+ "dimensional male",
161
+ "dimensional female",
162
+ "ancient male",
163
+ "ancient female",
164
+ "youthful male",
165
+ "youthful female"
166
+ ],
167
+ "edad": [
168
+ "child",
169
+ "teenager",
170
+ "young adult",
171
+ "middle-aged",
172
+ "elderly",
173
+ "infant",
174
+ "toddler",
175
+ "adolescent",
176
+ "infant",
177
+ "toddler",
178
+ "child",
179
+ "preteen",
180
+ "teenager",
181
+ "young adult",
182
+ "adult",
183
+ "middle-aged",
184
+ "elderly",
185
+ "ancient",
186
+ "immortal",
187
+ "ageless",
188
+ "timeless being",
189
+ "eternal youth",
190
+ "adolescent",
191
+ "early twenties",
192
+ "late twenties",
193
+ "early thirties",
194
+ "late thirties",
195
+ "early forties",
196
+ "late forties",
197
+ "centenarian",
198
+ "millennial being",
199
+ "baby boomer age",
200
+ "prime of life",
201
+ "declining years",
202
+ "venerable elder",
203
+ "spiritual youth",
204
+ "reborn soul",
205
+ "infantile appearance",
206
+ "teen-like appearance",
207
+ "mature appearance",
208
+ "elderly appearance",
209
+ "child-like immortal",
210
+ "age-shifting entity",
211
+ "age-locked individual",
212
+ "time-traveling child",
213
+ "time-traveling elder",
214
+ "chronologically young",
215
+ "chronologically old",
216
+ "prehistoric being",
217
+ "futuristic youth",
218
+ "post-apocalyptic elder",
219
+ "newborn celestial",
220
+ "teen celestial",
221
+ "ancient celestial",
222
+ "young alien",
223
+ "mature alien",
224
+ "ancient alien",
225
+ "robotic youth",
226
+ "robotic elder",
227
+ "synthetic ageless",
228
+ "digital reincarnation",
229
+ "prehistoric youth",
230
+ "prehistoric elder",
231
+ "youthful vampire",
232
+ "ancient vampire",
233
+ "eternally youthful spirit",
234
+ "ancient guardian",
235
+ "young elemental",
236
+ "mature elemental",
237
+ "child prodigy",
238
+ "young apprentice",
239
+ "seasoned master",
240
+ "elder mentor",
241
+ "eternal wanderer",
242
+ "young hero",
243
+ "elder sage",
244
+ "timeless traveler",
245
+ "youthful deity",
246
+ "ancient deity"
247
+ ],
248
+ "peinado": [
249
+ "long hair",
250
+ "short hair",
251
+ "medium-length hair",
252
+ "pixie cut",
253
+ "bob cut",
254
+ "curly hair",
255
+ "wavy hair",
256
+ "straight hair",
257
+ "braided",
258
+ "ponytail",
259
+ "high ponytail",
260
+ "low ponytail",
261
+ "messy bun",
262
+ "tight bun",
263
+ "half-up half-down",
264
+ "fishtail braid",
265
+ "crown braid",
266
+ "twin braids",
267
+ "side braid",
268
+ "cornrows",
269
+ "dreadlocks",
270
+ "afro",
271
+ "buzz cut",
272
+ "crew cut",
273
+ "undercut",
274
+ "fade",
275
+ "quiff",
276
+ "pompadour",
277
+ "mohawk",
278
+ "spiky hair",
279
+ "side-swept bangs",
280
+ "blunt bangs",
281
+ "asymmetrical cut",
282
+ "layered cut",
283
+ "shaggy cut",
284
+ "wolf cut",
285
+ "feathered hair",
286
+ "mullets",
287
+ "slicked-back hair",
288
+ "parted hair",
289
+ "center part",
290
+ "side part",
291
+ "twintails",
292
+ "odango buns",
293
+ "victory rolls",
294
+ "retro waves",
295
+ "vintage curls",
296
+ "soft curls",
297
+ "beach waves",
298
+ "ringlets",
299
+ "choppy layers",
300
+ "fringe bangs",
301
+ "tapered cut",
302
+ "hair with accessories",
303
+ "flower-adorned hair",
304
+ "ribbon-adorned hair",
305
+ "jeweled hairpins",
306
+ "hair with beads",
307
+ "dyed hair",
308
+ "ombre hair",
309
+ "gradient hair",
310
+ "high pigtails",
311
+ "low pigtails",
312
+ "waterfall braid",
313
+ "intricate updo",
314
+ "fantasy braids",
315
+ "hair loops",
316
+ "zigzag parting",
317
+ "layered bob",
318
+ "fluffy hair",
319
+ "textured hair",
320
+ "shoulder-length hair",
321
+ "flowing hair",
322
+ "tousled hair",
323
+ "wet look",
324
+ "gelled hair",
325
+ "space buns",
326
+ "top knot",
327
+ "shaved sides",
328
+ "hair with streaks",
329
+ "glowing hair",
330
+ "holographic hair",
331
+ "metallic hair",
332
+ "windblown hair",
333
+ "floating hair",
334
+ "gravity-defying hair",
335
+ "hair in a bun with chopsticks",
336
+ "hair with feathers",
337
+ "hair with seashells",
338
+ "braided crown with flowers",
339
+ "ornate updo",
340
+ "intricately braided ponytail",
341
+ "hair styled into horns",
342
+ "fantastical floating strands",
343
+ "halo braid",
344
+ "ethereal waves",
345
+ "draped hair",
346
+ "hair tied with pearls",
347
+ "dual-tone hair",
348
+ "multi-colored braids",
349
+ "twist-out curls",
350
+ "knotted updo",
351
+ "hair styled into spikes",
352
+ "anime-style bangs",
353
+ "hairstyle inspired by nature"
354
+ ],
355
+ "color_cabello": [
356
+ "black",
357
+ "brown",
358
+ "blonde",
359
+ "red",
360
+ "blue",
361
+ "green",
362
+ "purple",
363
+ "white",
364
+ "rainbow",
365
+ "silver",
366
+ "pink",
367
+ "golden",
368
+ "teal",
369
+ "magenta",
370
+ "turquoise",
371
+ "gradient",
372
+ "pastel",
373
+ "neon",
374
+ "crimson",
375
+ "emerald",
376
+ "lavender",
377
+ "peach",
378
+ "black",
379
+ "dark brown",
380
+ "light brown",
381
+ "blonde",
382
+ "platinum blonde",
383
+ "strawberry blonde",
384
+ "red",
385
+ "auburn",
386
+ "ginger",
387
+ "copper",
388
+ "chestnut",
389
+ "burgundy",
390
+ "mahogany",
391
+ "gray",
392
+ "white",
393
+ "silver",
394
+ "ash blonde",
395
+ "ash brown",
396
+ "blue",
397
+ "dark blue",
398
+ "light blue",
399
+ "sky blue",
400
+ "green",
401
+ "emerald green",
402
+ "lime green",
403
+ "teal",
404
+ "cyan",
405
+ "purple",
406
+ "lavender",
407
+ "violet",
408
+ "magenta",
409
+ "pink",
410
+ "hot pink",
411
+ "pastel pink",
412
+ "peach",
413
+ "orange",
414
+ "yellow",
415
+ "golden yellow",
416
+ "mustard yellow",
417
+ "rainbow",
418
+ "gradient",
419
+ "ombre",
420
+ "two-toned",
421
+ "split-dyed",
422
+ "streaked",
423
+ "frosted tips",
424
+ "highlights",
425
+ "lowlights",
426
+ "metallic gold",
427
+ "metallic silver",
428
+ "bronze",
429
+ "pearl white",
430
+ "opal",
431
+ "rose gold",
432
+ "neon green",
433
+ "neon pink",
434
+ "neon yellow",
435
+ "holographic",
436
+ "galaxy-themed",
437
+ "glowing blue",
438
+ "glowing red",
439
+ "transparent hair",
440
+ "fiery red",
441
+ "frosty white",
442
+ "charcoal black",
443
+ "natural hues",
444
+ "pastel tones",
445
+ "vivid colors",
446
+ "sunset gradient",
447
+ "ocean gradient",
448
+ "forest gradient",
449
+ "cosmic colors",
450
+ "midnight black",
451
+ "obsidian black",
452
+ "jet black",
453
+ "flaming orange",
454
+ "moss green",
455
+ "aquamarine",
456
+ "turquoise",
457
+ "ice blue",
458
+ "crimson",
459
+ "scarlet",
460
+ "ruby red",
461
+ "sand blonde",
462
+ "beach blonde",
463
+ "caramel brown",
464
+ "chocolate brown",
465
+ "honey blonde",
466
+ "espresso brown",
467
+ "ash gray",
468
+ "graphite gray",
469
+ "pearl ash",
470
+ "icy lavender",
471
+ "pastel rainbow",
472
+ "dragon scale gradient",
473
+ "mermaid green",
474
+ "unicorn colors",
475
+ "candy pink",
476
+ "sun-kissed blonde",
477
+ "midnight purple",
478
+ "starlight silver",
479
+ "autumn hues",
480
+ "spring meadow green",
481
+ "fiery sunset tones",
482
+ "stormy gray",
483
+ "rust orange",
484
+ "dusky pink",
485
+ "champagne blonde",
486
+ "cocoa brown",
487
+ "moonlit silver",
488
+ "starry night black",
489
+ "deep forest green"
490
+ ],
491
+ "ojos": [
492
+ "blue eyes",
493
+ "dark blue eyes",
494
+ "light blue eyes",
495
+ "sky blue eyes",
496
+ "green eyes",
497
+ "emerald green eyes",
498
+ "teal eyes",
499
+ "aqua eyes",
500
+ "brown eyes",
501
+ "dark brown eyes",
502
+ "light brown eyes",
503
+ "hazel eyes",
504
+ "amber eyes",
505
+ "golden eyes",
506
+ "yellow eyes",
507
+ "orange eyes",
508
+ "red eyes",
509
+ "crimson eyes",
510
+ "ruby red eyes",
511
+ "pink eyes",
512
+ "magenta eyes",
513
+ "purple eyes",
514
+ "lavender eyes",
515
+ "violet eyes",
516
+ "gray eyes",
517
+ "light gray eyes",
518
+ "silver eyes",
519
+ "charcoal eyes",
520
+ "white eyes",
521
+ "black eyes",
522
+ "jet black eyes",
523
+ "heterochromatic eyes",
524
+ "partial heterochromatic eyes",
525
+ "glowing blue eyes",
526
+ "glowing red eyes",
527
+ "glowing green eyes",
528
+ "glowing purple eyes",
529
+ "bioluminescent eyes",
530
+ "fiery eyes",
531
+ "icy eyes",
532
+ "galaxy-patterned eyes",
533
+ "starlit eyes",
534
+ "neon-colored eyes",
535
+ "pastel-colored eyes",
536
+ "rainbow eyes",
537
+ "multi-colored eyes",
538
+ "marbled eyes",
539
+ "crystal-like eyes",
540
+ "cat-like eyes",
541
+ "slitted pupils",
542
+ "reptilian eyes",
543
+ "dragon eyes",
544
+ "bird-like eyes",
545
+ "fish-like eyes",
546
+ "mechanical eyes",
547
+ "cybernetic eyes",
548
+ "robotic eyes",
549
+ "alien eyes",
550
+ "insectoid eyes",
551
+ "demonic eyes",
552
+ "angelic eyes",
553
+ "void-like eyes",
554
+ "mirror-like eyes",
555
+ "shimmering eyes",
556
+ "opal eyes",
557
+ "pearl-like eyes",
558
+ "stone-textured eyes",
559
+ "lava-filled eyes",
560
+ "smoky eyes",
561
+ "water-like eyes",
562
+ "fire-like eyes",
563
+ "glittering eyes",
564
+ "gemstone eyes",
565
+ "diamond eyes",
566
+ "sapphire eyes",
567
+ "emerald eyes",
568
+ "ruby eyes",
569
+ "amber stone eyes",
570
+ "topaz eyes",
571
+ "amethyst eyes",
572
+ "obsidian eyes",
573
+ "onyx eyes",
574
+ "cracked glass eyes",
575
+ "steampunk eyes",
576
+ "frosted glass eyes",
577
+ "stormy eyes",
578
+ "cloudy eyes",
579
+ "ethereal eyes",
580
+ "otherworldly eyes",
581
+ "solar flare eyes",
582
+ "lunar eyes",
583
+ "sunlit eyes",
584
+ "shadowy eyes",
585
+ "veined eyes",
586
+ "iridescent eyes",
587
+ "kaleidoscopic eyes",
588
+ "geometric-patterned eyes",
589
+ "mandala eyes",
590
+ "hypnotic eyes",
591
+ "glassy eyes",
592
+ "misty eyes"
593
+ ],
594
+ "piel": [
595
+ "fair skin",
596
+ "pale skin",
597
+ "ivory skin",
598
+ "light skin",
599
+ "medium skin",
600
+ "olive skin",
601
+ "tan skin",
602
+ "bronzed skin",
603
+ "dark skin",
604
+ "ebony skin",
605
+ "chocolate brown skin",
606
+ "caramel skin",
607
+ "peach-toned skin",
608
+ "rosy skin",
609
+ "freckled skin",
610
+ "alabaster skin",
611
+ "porcelain skin",
612
+ "golden skin",
613
+ "amber skin",
614
+ "copper skin",
615
+ "ashen skin",
616
+ "gray skin",
617
+ "silver skin",
618
+ "metallic skin",
619
+ "white skin",
620
+ "translucent skin",
621
+ "glowing skin",
622
+ "luminescent skin",
623
+ "iridescent skin",
624
+ "crystalline skin",
625
+ "opal-textured skin",
626
+ "pearl-textured skin",
627
+ "stone-textured skin",
628
+ "marble-textured skin",
629
+ "lava-textured skin",
630
+ "molten skin",
631
+ "fiery skin",
632
+ "smoky skin",
633
+ "water-like skin",
634
+ "gel-like skin",
635
+ "scaly skin",
636
+ "reptilian skin",
637
+ "fish-like skin",
638
+ "amphibian-like skin",
639
+ "feathered skin",
640
+ "furry skin",
641
+ "insectoid skin",
642
+ "chitinous skin",
643
+ "alien-textured skin",
644
+ "cosmic-patterned skin",
645
+ "starry skin",
646
+ "nebula-patterned skin",
647
+ "galaxy-themed skin",
648
+ "shadowy skin",
649
+ "veined skin",
650
+ "cracked skin",
651
+ "aged skin",
652
+ "weathered skin",
653
+ "youthful skin",
654
+ "smooth skin",
655
+ "rough skin",
656
+ "tattooed skin",
657
+ "tribal-patterned skin",
658
+ "scarred skin",
659
+ "burn-marked skin",
660
+ "branded skin",
661
+ "cybernetic-textured skin",
662
+ "synthetic skin",
663
+ "bioluminescent skin",
664
+ "camouflaging skin",
665
+ "invisible skin",
666
+ "wooden-textured skin",
667
+ "bark-like skin",
668
+ "leafy skin",
669
+ "flower-petal skin",
670
+ "thorny skin",
671
+ "crystal-embedded skin",
672
+ "gemstone-textured skin",
673
+ "holographic skin",
674
+ "color-shifting skin",
675
+ "gradient-colored skin",
676
+ "rainbow-hued skin",
677
+ "dragon-scale skin",
678
+ "snake-scale skin",
679
+ "butterfly-wing skin",
680
+ "frost-covered skin",
681
+ "snowy-textured skin",
682
+ "sand-textured skin",
683
+ "desert-dry skin",
684
+ "ocean-wave skin",
685
+ "coral-textured skin",
686
+ "mossy skin",
687
+ "lichen-covered skin",
688
+ "fungal-textured skin",
689
+ "glassy skin",
690
+ "mirrored skin",
691
+ "shadow-absorbing skin"
692
+ ],
693
+ "ropa": [
694
+ "casual wear",
695
+ "t-shirt and jeans",
696
+ "hoodie and sweatpants",
697
+ "shorts and tank top",
698
+ "flannel shirt and ripped jeans",
699
+ "crop top and leggings",
700
+ "denim jacket and skirt",
701
+ "formal suit",
702
+ "evening gown",
703
+ "cocktail dress",
704
+ "tuxedo",
705
+ "business suit",
706
+ "blazer and slacks",
707
+ "pencil skirt and blouse",
708
+ "kimono",
709
+ "hanbok",
710
+ "sari",
711
+ "qipao",
712
+ "dashiki",
713
+ "kilt",
714
+ "kaftan",
715
+ "abaya",
716
+ "dirndl",
717
+ "sombrero vueltiao",
718
+ "mariachi suit",
719
+ "traditional African robes",
720
+ "Navajo dress",
721
+ "Inuit fur parka",
722
+ "track suit",
723
+ "yoga outfit",
724
+ "soccer uniform",
725
+ "basketball jersey",
726
+ "tennis outfit",
727
+ "ballet leotard",
728
+ "ski suit",
729
+ "swimwear",
730
+ "gymnastics outfit",
731
+ "medieval armor",
732
+ "renaissance dress",
733
+ "Victorian gown",
734
+ "Roman toga",
735
+ "Greek chiton",
736
+ "samurai armor",
737
+ "pirate outfit",
738
+ "cowboy attire",
739
+ "flapper dress",
740
+ "steampunk clothing",
741
+ "futuristic space suit",
742
+ "cyberpunk outfit",
743
+ "robotic armor",
744
+ "alien ceremonial robes",
745
+ "fantasy adventurer attire",
746
+ "wizard robes",
747
+ "elven tunic and cloak",
748
+ "vampire cloak",
749
+ "stealth suit",
750
+ "mecha pilot uniform",
751
+ "1960s mod outfit",
752
+ "1970s disco attire",
753
+ "1980s neon fashion",
754
+ "1990s grunge outfit",
755
+ "ancient Egyptian attire",
756
+ "Mayan ceremonial outfit",
757
+ "Viking warrior clothing",
758
+ "gothic attire",
759
+ "punk rock outfit",
760
+ "hippie outfit",
761
+ "military uniform",
762
+ "school uniform",
763
+ "maid outfit",
764
+ "butler uniform",
765
+ "nurse outfit",
766
+ "cowboy hat and boots",
767
+ "tropical vacation wear",
768
+ "explorer outfit",
769
+ "adventurer gear",
770
+ "sci-fi battle suit",
771
+ "forest ranger outfit",
772
+ "flowing cape",
773
+ "hooded cloak",
774
+ "feathered headdress",
775
+ "crown and royal robes",
776
+ "fur-lined coat",
777
+ "chainmail and leather armor",
778
+ "battle-worn tunic",
779
+ "lace gloves and parasol",
780
+ "layered scarf and jacket",
781
+ "long trench coat",
782
+ "silk dress",
783
+ "velvet suit",
784
+ "glowing neon armor",
785
+ "holographic jacket"
786
+ ],
787
+ "escenario": [
788
+ "enchanted forest",
789
+ "space station",
790
+ "desert",
791
+ "futuristic city",
792
+ "underwater kingdom",
793
+ "botanical garden",
794
+ "castle",
795
+ "dungeon",
796
+ "volcano",
797
+ "ice cave",
798
+ "cloud palace",
799
+ "ancient ruins",
800
+ "moon surface",
801
+ "alien planet",
802
+ "fairy glade",
803
+ "battlefield",
804
+ "high-tech lab",
805
+ "abandoned city",
806
+ "floating island",
807
+ "ocean cliff",
808
+ "crystal cave",
809
+ "rainforest",
810
+ "cyberpunk metropolis",
811
+ "steampunk village",
812
+ "lunar base",
813
+ "galactic war zone",
814
+ "Victorian mansion",
815
+ "lush forest",
816
+ "tropical rainforest",
817
+ "dense jungle",
818
+ "bamboo grove",
819
+ "desert oasis",
820
+ "rolling meadows",
821
+ "rocky mountains",
822
+ "volcanic landscape",
823
+ "snow-covered tundra",
824
+ "frozen lake",
825
+ "coral reef",
826
+ "underwater cave",
827
+ "crystal-clear beach",
828
+ "island paradise",
829
+ "waterfall",
830
+ "sunset savanna",
831
+ "flower meadow",
832
+ "starry night in the wilderness",
833
+ "modern city skyline",
834
+ "bustling marketplace",
835
+ "quiet suburban street",
836
+ "vintage European alley",
837
+ "neon-lit cyberpunk city",
838
+ "abandoned factory",
839
+ "train station at dusk",
840
+ "crowded subway",
841
+ "urban rooftop",
842
+ "art deco skyscraper",
843
+ "street with cherry blossoms",
844
+ "stone bridge over a canal",
845
+ "enchanted forest",
846
+ "floating islands",
847
+ "dragon's lair",
848
+ "mystical cave",
849
+ "fairy glade",
850
+ "castle in the clouds",
851
+ "ancient ruins",
852
+ "portal to another world",
853
+ "underworld cavern",
854
+ "elf village",
855
+ "giant mushroom forest",
856
+ "magical library",
857
+ "mermaid kingdom",
858
+ "space station",
859
+ "alien planet",
860
+ "dystopian wasteland",
861
+ "floating metropolis",
862
+ "robotic factory",
863
+ "zero-gravity chamber",
864
+ "asteroid mining colony",
865
+ "galactic senate hall",
866
+ "crashed spaceship site",
867
+ "holographic shopping mall",
868
+ "medieval village",
869
+ "renaissance marketplace",
870
+ "Victorian manor",
871
+ "ancient Roman coliseum",
872
+ "Greek amphitheater",
873
+ "Aztec temple",
874
+ "Mayan pyramid",
875
+ "Egyptian tomb",
876
+ "Wild West frontier town",
877
+ "WWII battlefield",
878
+ "infinite staircase",
879
+ "floating clocks landscape",
880
+ "fractured mirror world",
881
+ "kaleidoscope environment",
882
+ "neon grid",
883
+ "dream-like cloudscape",
884
+ "labyrinthine maze",
885
+ "endless library",
886
+ "checkerboard world",
887
+ "gravity-defying city",
888
+ "luxurious palace hall",
889
+ "cozy log cabin",
890
+ "gothic cathedral",
891
+ "old library",
892
+ "high-tech lab",
893
+ "abandoned mansion",
894
+ "secret bunker",
895
+ "underground tunnel",
896
+ "vintage diner",
897
+ "museum gallery",
898
+ "battlefield at dawn",
899
+ "pirate ship deck",
900
+ "spooky graveyard",
901
+ "haunted forest",
902
+ "carnival at night",
903
+ "circus tent",
904
+ "deserted amusement park",
905
+ "train in the countryside",
906
+ "airport terminal",
907
+ "floating gardens",
908
+ "fishing village",
909
+ "countryside barn"
910
+ ],
911
+ "emocion": [
912
+ "happy",
913
+ "sad",
914
+ "angry",
915
+ "thoughtful",
916
+ "energetic",
917
+ "shy",
918
+ "playful",
919
+ "smirking",
920
+ "confused",
921
+ "determined",
922
+ "surprised",
923
+ "scared",
924
+ "calm",
925
+ "proud",
926
+ "sassy",
927
+ "flirty",
928
+ "melancholic",
929
+ "mischievous",
930
+ "focused",
931
+ "sleepy",
932
+ "worried",
933
+ "excited",
934
+ "curious",
935
+ "bored",
936
+ "nervous",
937
+ "hopeful",
938
+ "amused",
939
+ "disappointed",
940
+ "in awe",
941
+ "distrustful",
942
+ "happy",
943
+ "joyful",
944
+ "cheerful",
945
+ "ecstatic",
946
+ "content",
947
+ "playful",
948
+ "proud",
949
+ "grateful",
950
+ "excited",
951
+ "hopeful",
952
+ "relieved",
953
+ "peaceful",
954
+ "satisfied",
955
+ "amused",
956
+ "loving",
957
+ "affectionate",
958
+ "optimistic",
959
+ "flirty",
960
+ "sad",
961
+ "melancholic",
962
+ "heartbroken",
963
+ "lonely",
964
+ "angry",
965
+ "frustrated",
966
+ "resentful",
967
+ "bitter",
968
+ "jealous",
969
+ "anxious",
970
+ "nervous",
971
+ "worried",
972
+ "guilty",
973
+ "regretful",
974
+ "ashamed",
975
+ "fearful",
976
+ "terrified",
977
+ "panicked",
978
+ "envious",
979
+ "thoughtful",
980
+ "calm",
981
+ "determined",
982
+ "focused",
983
+ "curious",
984
+ "confused",
985
+ "intrigued",
986
+ "nostalgic",
987
+ "indifferent",
988
+ "bored",
989
+ "skeptical",
990
+ "inspired",
991
+ "surprised",
992
+ "shocked",
993
+ "amazed",
994
+ "awed",
995
+ "shy",
996
+ "bashful",
997
+ "hesitant",
998
+ "teasing",
999
+ "smirking",
1000
+ "sarcastic",
1001
+ "sassy",
1002
+ "rebellious",
1003
+ "playful mischief",
1004
+ "coy",
1005
+ "charming",
1006
+ "distracted",
1007
+ "reserved",
1008
+ "insecure",
1009
+ "resigned",
1010
+ "apathetic",
1011
+ "hopeful resilience",
1012
+ "elated",
1013
+ "overjoyed",
1014
+ "euphoric",
1015
+ "infuriated",
1016
+ "seething",
1017
+ "desperate",
1018
+ "grief-stricken",
1019
+ "paranoid",
1020
+ "hysterical",
1021
+ "exhilarated",
1022
+ "enthralled",
1023
+ "overwhelmed",
1024
+ "vindictive",
1025
+ "vengeful",
1026
+ "empathetic",
1027
+ "compassionate",
1028
+ "ambitious",
1029
+ "restless",
1030
+ "adventurous",
1031
+ "protective",
1032
+ "heroic",
1033
+ "worried parent",
1034
+ "proud mentor",
1035
+ "loving partner",
1036
+ "lonely traveler",
1037
+ "awkward",
1038
+ "embarrassed",
1039
+ "gracious",
1040
+ "diplomatic",
1041
+ "friendly",
1042
+ "charismatic",
1043
+ "supportive",
1044
+ "dismissive",
1045
+ "judgmental",
1046
+ "sympathetic",
1047
+ "distant",
1048
+ "untrusting",
1049
+ "cautious",
1050
+ "inclusive",
1051
+ "demanding",
1052
+ "maniacal laughter",
1053
+ "evil grin",
1054
+ "triumphant",
1055
+ "divine serenity",
1056
+ "mystical trance",
1057
+ "sinister plotting",
1058
+ "possessed",
1059
+ "mesmerized",
1060
+ "otherworldly calm",
1061
+ "unstoppable rage",
1062
+ "glowing with inner peace"
1063
+ ],
1064
+ "pose": [
1065
+ "standing",
1066
+ "sitting",
1067
+ "running",
1068
+ "jumping",
1069
+ "flying",
1070
+ "dancing",
1071
+ "kneeling",
1072
+ "reclining",
1073
+ "leaning against a wall",
1074
+ "crouching",
1075
+ "spinning",
1076
+ "stretching",
1077
+ "climbing",
1078
+ "diving",
1079
+ "walking",
1080
+ "posing with a weapon",
1081
+ "holding an object",
1082
+ "giving a thumbs up",
1083
+ "pointing",
1084
+ "waving",
1085
+ "crossing arms",
1086
+ "hand on hip",
1087
+ "looking over shoulder",
1088
+ "arms open wide",
1089
+ "resting head on hand",
1090
+ "hands in pockets",
1091
+ "standing",
1092
+ "sitting",
1093
+ "leaning against a wall",
1094
+ "hands in pockets",
1095
+ "crossed arms",
1096
+ "hands behind back",
1097
+ "lying down",
1098
+ "kneeling",
1099
+ "crouching",
1100
+ "one hand on hip",
1101
+ "legs crossed while sitting",
1102
+ "looking over shoulder",
1103
+ "running",
1104
+ "jumping",
1105
+ "walking",
1106
+ "skipping",
1107
+ "dancing",
1108
+ "spinning",
1109
+ "reaching out",
1110
+ "climbing",
1111
+ "stretching arms upward",
1112
+ "fighting stance",
1113
+ "dodging",
1114
+ "attacking",
1115
+ "diving forward",
1116
+ "falling dramatically",
1117
+ "arms wide open",
1118
+ "facepalm",
1119
+ "shrugging shoulders",
1120
+ "pointing forward",
1121
+ "one hand covering mouth",
1122
+ "hands on cheeks",
1123
+ "waving",
1124
+ "saluting",
1125
+ "blowing a kiss",
1126
+ "hands clasped together",
1127
+ "clutching chest",
1128
+ "holding head in hands",
1129
+ "arms crossed defiantly",
1130
+ "sitting cross-legged",
1131
+ "reclining on a couch",
1132
+ "lying on stomach with legs up",
1133
+ "sitting on a fence",
1134
+ "leaning on one elbow",
1135
+ "hands resting on lap",
1136
+ "resting chin on hand",
1137
+ "hands folded in front",
1138
+ "drawing a weapon",
1139
+ "holding a sword",
1140
+ "aiming a bow",
1141
+ "holding a shield",
1142
+ "casting a spell",
1143
+ "throwing a punch",
1144
+ "kicking forward",
1145
+ "charging into battle",
1146
+ "parkour mid-air",
1147
+ "pulling an arrow from quiver",
1148
+ "holding hands",
1149
+ "hugging",
1150
+ "handshake",
1151
+ "high-five",
1152
+ "whispering to another",
1153
+ "carrying someone on back",
1154
+ "sitting side by side",
1155
+ "resting head on someone's shoulder",
1156
+ "taking a selfie",
1157
+ "dancing in a pair",
1158
+ "posing for a photo",
1159
+ "reading a book",
1160
+ "writing with a pen",
1161
+ "holding a cup of coffee",
1162
+ "playing a musical instrument",
1163
+ "gardening",
1164
+ "sketching on a canvas",
1165
+ "holding an umbrella",
1166
+ "balancing on one foot",
1167
+ "flying with wings outstretched",
1168
+ "floating in mid-air",
1169
+ "reaching towards the sky",
1170
+ "sprawled out dramatically",
1171
+ "intertwined with vines",
1172
+ "holding an orb of light",
1173
+ "standing on water",
1174
+ "reaching through a mirror",
1175
+ "suspended upside down",
1176
+ "folded into a lotus position",
1177
+ "hands glowing with energy"
1178
+ ],
1179
+ "extras": [
1180
+ "scarred face",
1181
+ "magic sparks",
1182
+ "cybernetic implants",
1183
+ "wings",
1184
+ "horns",
1185
+ "halo",
1186
+ "tail",
1187
+ "animal ears",
1188
+ "glowing tattoos",
1189
+ "mechanical limbs",
1190
+ "floating particles",
1191
+ "aura of light",
1192
+ "dark shadows",
1193
+ "glowing crystals",
1194
+ "floating books",
1195
+ "fireflies",
1196
+ "flowers in hair",
1197
+ "crown of leaves",
1198
+ "starry aura",
1199
+ "snowflakes",
1200
+ "rain droplets",
1201
+ "energy field",
1202
+ "floating debris",
1203
+ "butterflies",
1204
+ "dragon companion",
1205
+ "pet wolf",
1206
+ "robotic drone",
1207
+ "magical staff",
1208
+ "scarred face",
1209
+ "freckles",
1210
+ "beauty marks",
1211
+ "tattoos",
1212
+ "cybernetic implants",
1213
+ "glowing skin",
1214
+ "metallic skin",
1215
+ "pale skin",
1216
+ "mosaic skin",
1217
+ "transparent skin",
1218
+ "bioluminescent markings",
1219
+ "neon veins",
1220
+ "holographic body",
1221
+ "artificial eyes",
1222
+ "mechanical limbs",
1223
+ "human ears",
1224
+ "animal ears",
1225
+ "tail",
1226
+ "horns",
1227
+ "wings",
1228
+ "feathers",
1229
+ "spikes",
1230
+ "claws",
1231
+ "hooves",
1232
+ "scales",
1233
+ "fur",
1234
+ "tentacles",
1235
+ "beak",
1236
+ "multiple arms",
1237
+ "extra fingers",
1238
+ "extra eyes",
1239
+ "crystals growing from body",
1240
+ "gills",
1241
+ "muscle definition",
1242
+ "frosted skin",
1243
+ "glowing markings",
1244
+ "long nails",
1245
+ "fingers glowing",
1246
+ "jewels embedded in skin",
1247
+ "halo",
1248
+ "headband",
1249
+ "gloves",
1250
+ "bracelets",
1251
+ "necklace",
1252
+ "earrings",
1253
+ "sunglasses",
1254
+ "scarf",
1255
+ "mask",
1256
+ "hat",
1257
+ "ear cuffs",
1258
+ "anklets",
1259
+ "ring",
1260
+ "watch",
1261
+ "backpack",
1262
+ "belt",
1263
+ "sash",
1264
+ "pocket watch",
1265
+ "cuffs",
1266
+ "bandana",
1267
+ "cape",
1268
+ "collar",
1269
+ "chain",
1270
+ "armor pieces",
1271
+ "boots",
1272
+ "sword",
1273
+ "bow and arrow",
1274
+ "magic staff",
1275
+ "shield",
1276
+ "potion bottle",
1277
+ "book of spells",
1278
+ "magic wand",
1279
+ "crystal ball",
1280
+ "spell book",
1281
+ "headphones",
1282
+ "glasses",
1283
+ "purse",
1284
+ "umbrella",
1285
+ "briefcase",
1286
+ "flower crown",
1287
+ "cigar",
1288
+ "cigarette",
1289
+ "lollipop",
1290
+ "ice cream",
1291
+ "weapon holster",
1292
+ "camera",
1293
+ "phone",
1294
+ "cup of tea",
1295
+ "sword in hand",
1296
+ "suitcase",
1297
+ "teddy bear",
1298
+ "giant scissors",
1299
+ "magic sparks",
1300
+ "glowing aura",
1301
+ "fireflies",
1302
+ "smoke",
1303
+ "mist",
1304
+ "nebula",
1305
+ "clouds",
1306
+ "stars",
1307
+ "electricity",
1308
+ "fire",
1309
+ "ice",
1310
+ "wind",
1311
+ "rain",
1312
+ "snow",
1313
+ "falling leaves",
1314
+ "floating particles",
1315
+ "magical mist",
1316
+ "twinkling lights",
1317
+ "sunbeams",
1318
+ "moonlight",
1319
+ "shadowy figures",
1320
+ "water splash",
1321
+ "energy orbs",
1322
+ "energy beams",
1323
+ "lightning bolts",
1324
+ "explosion",
1325
+ "rays of light",
1326
+ "swirling magic",
1327
+ "spectrum of colors",
1328
+ "cracked earth",
1329
+ "glowing runes",
1330
+ "light trails",
1331
+ "shimmering reflections",
1332
+ "sparkling dust",
1333
+ "glitter",
1334
+ "bokeh",
1335
+ "fog",
1336
+ "rays of fire",
1337
+ "glowing hands",
1338
+ "magical symbols floating",
1339
+ "spinning runes",
1340
+ "cinematic lighting",
1341
+ "high contrast",
1342
+ "soft focus",
1343
+ "hdr lighting",
1344
+ "ultra-detailed textures",
1345
+ "vintage filter",
1346
+ "retro style",
1347
+ "neon lights",
1348
+ "futuristic neon",
1349
+ "vaporwave style",
1350
+ "pixelated background",
1351
+ "grainy texture",
1352
+ "lens flare",
1353
+ "sunlight rays",
1354
+ "backlight",
1355
+ "dramatic shadows",
1356
+ "cross processing",
1357
+ "oil painting texture",
1358
+ "watercolor effect",
1359
+ "comic book style",
1360
+ "sketch style",
1361
+ "cartoonish look",
1362
+ "highly stylized",
1363
+ "low-poly",
1364
+ "vivid colors",
1365
+ "glow effect",
1366
+ "hyper-realistic",
1367
+ "motion blur",
1368
+ "reflections in water",
1369
+ "cyberpunk style",
1370
+ "steampunk style",
1371
+ "neon glow",
1372
+ "high detail",
1373
+ "color shift",
1374
+ "vibrant hues",
1375
+ "motion effect",
1376
+ "exaggerated shadows",
1377
+ "blurry background",
1378
+ "textured background",
1379
+ "detailed background",
1380
+ "fantasy lighting",
1381
+ "dreamlike quality",
1382
+ "distorted visuals"
1383
+ ]
1384
+ }
main.py ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import random
3
+ import time
4
+ import pickle
5
+ from threading import Lock
6
+ from datetime import datetime, timedelta
7
+ from collections import defaultdict
8
+ from typing import Dict, List
9
+ from fastapi import FastAPI, HTTPException, Request
10
+ from loguru import logger
11
+ from slowapi import Limiter, _rate_limit_exceeded_handler
12
+ from slowapi.util import get_remote_address
13
+ from slowapi.errors import RateLimitExceeded
14
+ from fastapi.middleware.cors import CORSMiddleware
15
+
16
+ MIN_PROMPTS = 1
17
+ MAX_PROMPTS = 1000
18
+ RATE_LIMIT = "100/minute"
19
+ CACHE_TTL = 300
20
+ CATEGORIES_FILE = "categories.json"
21
+ CACHE_FILE = "cache.pkl"
22
+ LOCK = Lock()
23
+ IP_REQUESTS = defaultdict(list)
24
+
25
+ logger.add("app.log", rotation="500 MB", retention="2 days", level="ERROR")
26
+
27
+ categorias_cache = None
28
+ last_cache_update = 0
29
+
30
+ app = FastAPI(
31
+ title="API de Generaci贸n de Prompts",
32
+ version="1.0.0",
33
+ docs_url=None,
34
+ redoc_url=None,
35
+ openapi_url=None,
36
+ )
37
+
38
+ app.add_middleware(
39
+ CORSMiddleware,
40
+ allow_origins=["*"],
41
+ allow_credentials=True,
42
+ allow_methods=["*"],
43
+ allow_headers=["*"],
44
+ )
45
+
46
+ limiter = Limiter(key_func=get_remote_address, default_limits=[RATE_LIMIT])
47
+ app.state.limiter = limiter
48
+ app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
49
+
50
+
51
+ def load_categories() -> Dict[str, List[str]]:
52
+ with LOCK:
53
+ try:
54
+ with open(CATEGORIES_FILE, "r") as file:
55
+ return json.load(file)
56
+ except (FileNotFoundError, json.JSONDecodeError) as e:
57
+ logger.error(f"Error al cargar 'categories.json': {str(e)}")
58
+ raise HTTPException(status_code=500, detail="Error al cargar categor铆as.")
59
+
60
+
61
+ def save_cache(data):
62
+ with open(CACHE_FILE, "wb") as f:
63
+ pickle.dump(data, f)
64
+
65
+
66
+ def load_cache():
67
+ try:
68
+ with open(CACHE_FILE, "rb") as f:
69
+ return pickle.load(f)
70
+ except (FileNotFoundError, pickle.UnpicklingError):
71
+ return None
72
+
73
+
74
+ def get_cached_categories() -> Dict[str, List[str]]:
75
+ global categorias_cache, last_cache_update
76
+ current_time = time.time()
77
+
78
+ if categorias_cache is None or (current_time - last_cache_update) > CACHE_TTL:
79
+ categorias_cache = load_categories()
80
+ save_cache(categorias_cache)
81
+ last_cache_update = current_time
82
+
83
+ return categorias_cache
84
+
85
+
86
+ def calcular_combinaciones(record_count: Dict[str, int]) -> int:
87
+ total_combinations = 1
88
+ for count in record_count.values():
89
+ total_combinations *= count
90
+ return total_combinations
91
+
92
+
93
+ @app.get("/")
94
+ @limiter.limit(RATE_LIMIT)
95
+ async def read_root(request: Request):
96
+ logger.info("Endpoint ra铆z consultado.")
97
+ return {"message": "Bienvenido a la API de generaci贸n de prompts"}
98
+
99
+
100
+ @app.get("/generate")
101
+ @limiter.limit(RATE_LIMIT)
102
+ async def detail_generate_prompts(request: Request):
103
+ logger.warning("Intento de generar prompts sin cantidad especificada.")
104
+ raise HTTPException(
105
+ status_code=400,
106
+ detail="Debe especificar la cantidad de prompts a generar, por ejemplo: /generate/10",
107
+ )
108
+
109
+
110
+ @app.get("/generate/{cantidad}")
111
+ @limiter.limit(RATE_LIMIT)
112
+ async def generate_prompts(request: Request, cantidad: int):
113
+ if cantidad < MIN_PROMPTS or cantidad > MAX_PROMPTS:
114
+ logger.warning(
115
+ f"Intento de generar {cantidad} prompts: fuera del rango permitido."
116
+ )
117
+ raise HTTPException(
118
+ status_code=400,
119
+ detail=f"La cantidad debe estar entre {MIN_PROMPTS} y {MAX_PROMPTS}.",
120
+ )
121
+
122
+ prompts = [generar_base_prompt() for _ in range(cantidad)]
123
+ logger.info(f"Generados {cantidad} prompts exitosamente.")
124
+ return {"prompts": prompts}
125
+
126
+
127
+ @app.get("/count_records")
128
+ @limiter.limit(RATE_LIMIT)
129
+ async def count_records(request: Request):
130
+ try:
131
+ categorias = get_cached_categories()
132
+ record_count = {key: len(value) for key, value in categorias.items()}
133
+ logger.info(f"N煤mero de registros por etiqueta: {record_count}")
134
+
135
+ total_combinations = calcular_combinaciones(record_count)
136
+ logger.info(f"Total de combinaciones posibles: {total_combinations}")
137
+
138
+ return {"record_count": record_count, "total_combinations": total_combinations}
139
+ except HTTPException as e:
140
+ raise e
141
+
142
+
143
+ @app.middleware("http")
144
+ async def limit_request_frequency(request: Request, call_next):
145
+ ip = request.client.host
146
+ now = datetime.now()
147
+
148
+ IP_REQUESTS[ip] = [
149
+ time for time in IP_REQUESTS[ip] if now - time < timedelta(minutes=1)
150
+ ]
151
+
152
+ if len(IP_REQUESTS[ip]) >= 100:
153
+ logger.warning(f"Bloqueo temporal para la IP {ip}, demasiadas solicitudes.")
154
+ raise HTTPException(
155
+ status_code=429, detail="Demasiadas solicitudes. Espere 1 minuto."
156
+ )
157
+
158
+ IP_REQUESTS[ip].append(now)
159
+ response = await call_next(request)
160
+ return response
161
+
162
+
163
+ def generar_base_prompt() -> str:
164
+ categorias = get_cached_categories()
165
+ return (
166
+ f"A {random.choice(categorias['edad'])} {random.choice(categorias['sexo'])} "
167
+ f"{random.choice(categorias['tipo'])} with {random.choice(categorias['peinado'])} "
168
+ f"({random.choice(categorias['color_cabello'])}) and {random.choice(categorias['ojos'])}, "
169
+ f"having {random.choice(categorias['piel'])}, wearing {random.choice(categorias['ropa'])}, "
170
+ f"in a {random.choice(categorias['escenario'])}, {random.choice(categorias['pose'])} while feeling "
171
+ f"{random.choice(categorias['emocion'])}, adorned with {random.choice(categorias['extras'])}."
172
+ )
pyproject.toml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "prompt"
3
+ version = "0.1.0"
4
+ description = "Generate prompts for user input in Stable Difussion"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "fastapi>=0.111.0",
9
+ "loguru>=0.7.3",
10
+ "pydantic>=2.9.2",
11
+ "slowapi>=0.1.9",
12
+ "uvicorn>=0.30.6",
13
+ ]