charliealonso commited on
Commit
ee788fc
1 Parent(s): 70700ed

Corregir error linea 41, cabeceras español

Browse files
.DS_Store ADDED
Binary file (6.15 kB). View file
 
Arquitectura.csv CHANGED
@@ -1,4 +1,4 @@
1
- Estilo de foto,Localizacion,Estilo,Iluminacion,Paleta de colores,Lente,Composicion,Horizonte,Sombras,Geometria,Texturas,Entorno,Vistas,Hora del dia,Atmosfera,Calidad
2
  Capture the essence of,interior location,Modern,Natural light,Warm Tones,Wide Angle,Rule of thirds,Low,Hard shadows,Cube,Smooth,Urban,Wide-angle view,Early morning,Moody,4K --ar 16:9
3
  Create a striking architectural shot featuring,exterior location,Minimalist,Artificial light,Cool Tones,Standard,Symmetrical,Eye-level,Soft shadows,Sphere,Rough,Rural,Close-up view,Morning,Ethereal,
4
  ,Beach,Industrial,Candlelight,Neutral Tones,Telephoto,Asymmetrical,High,No shadows,Cylinder,Textured,Beach,Top-down view,Late morning,Serene,
 
1
+ Photo style,Location,Style,Lighting,Color palette,Lens,Composicion,Horizon,Shadows,Geometry,textures,Environment,Views,Time of the day,atmosphere,quality
2
  Capture the essence of,interior location,Modern,Natural light,Warm Tones,Wide Angle,Rule of thirds,Low,Hard shadows,Cube,Smooth,Urban,Wide-angle view,Early morning,Moody,4K --ar 16:9
3
  Create a striking architectural shot featuring,exterior location,Minimalist,Artificial light,Cool Tones,Standard,Symmetrical,Eye-level,Soft shadows,Sphere,Rough,Rural,Close-up view,Morning,Ethereal,
4
  ,Beach,Industrial,Candlelight,Neutral Tones,Telephoto,Asymmetrical,High,No shadows,Cylinder,Textured,Beach,Top-down view,Late morning,Serene,
Fotogramas Historicos.csv CHANGED
@@ -1,4 +1,4 @@
1
- Escena,Era,presentando,Escena,hora del dia,temperatura de color,iluminacion,profundidad de campo,composicion,ambiente,sombras,Camara,Pelicula,Calidad
2
  Create a scene set in ,"Ancient Rome,","Julius Caesar,","outdoor setting,","morning time of day,","warm color temperature,","natural light sources,","shallow depth of field,","dynamic composition,","minimalist environment,","hard shadows,","Canon 5D Mark III,",Lomography XPro 200,8K --ar 16:9
3
  ,"Ancient Egypt,","Cleopatra,","indoor setting,","night time of day,","cool color temperature,","artificial light sources,","deep depth of field,","static composition,","busy environment,","soft shadows,","Nikon D850,",Kodak Gold 200,
4
  ,"France,","Napoleón Bonaparte,",,"afternoon time of day,","neutral color temperature,","colorful light sources,","variable depth of field,","balanced composition,",,"diffuse shadows,","Sony Alpha a7 III,",Fujifilm Pro 400H,
 
1
+ Scene,Era,featuring,Scene,time of day,color temperature,lighting,deep of field,composition,environment,shadows,Camara,Film,Quality
2
  Create a scene set in ,"Ancient Rome,","Julius Caesar,","outdoor setting,","morning time of day,","warm color temperature,","natural light sources,","shallow depth of field,","dynamic composition,","minimalist environment,","hard shadows,","Canon 5D Mark III,",Lomography XPro 200,8K --ar 16:9
3
  ,"Ancient Egypt,","Cleopatra,","indoor setting,","night time of day,","cool color temperature,","artificial light sources,","deep depth of field,","static composition,","busy environment,","soft shadows,","Nikon D850,",Kodak Gold 200,
4
  ,"France,","Napoleón Bonaparte,",,"afternoon time of day,","neutral color temperature,","colorful light sources,","variable depth of field,","balanced composition,",,"diffuse shadows,","Sony Alpha a7 III,",Fujifilm Pro 400H,
Interiorismo 2.csv CHANGED
@@ -1,4 +1,4 @@
1
- Foto estilo,Encuadre,objeto 1,objeto 2,objeto 3,objeto 4,Material 1,Material 2,Material 3,Mobiliario,Iluminación,Ambiente,Entorno,Hora del día,atmósfera,estilo,calidad
2
  Editorial Style Photo,Straight On,Modern Nursery,Table Lamp,Rocking Chair,"Tree Wall Decal,",Stone,Seagrass,Linen,Pottery Barn,Natural Light,Beachy,Beachy,Morning,Relaxed,Coastal,4K --ar 16:9
3
  ,Low angle,"Industrial Home Office,",Steel Shelves,Exposed Ductwork,Edison Bulbs,Brick,Bamboo,Cotton,Crate and Barrel,Soft Light,Nautical,Nautical,Afternoon,Casual,Rustic,
4
  ,High angle,Art Deco Dining Room,Marble Tabl,Chandelier,intricate Tile Work,Concrete,Sisal,Velvet,West Elm,Hard Light,Coastal,Coastal,Sunset,Laid-back,Minimalist,
 
1
+ Photo style,Framing,object 1,object 2,object 3,object 4,Material 1,Material 2,Material 3,Furniture,Lighting,Environment,Environment,Time of the day,atmosphere,style,quality
2
  Editorial Style Photo,Straight On,Modern Nursery,Table Lamp,Rocking Chair,"Tree Wall Decal,",Stone,Seagrass,Linen,Pottery Barn,Natural Light,Beachy,Beachy,Morning,Relaxed,Coastal,4K --ar 16:9
3
  ,Low angle,"Industrial Home Office,",Steel Shelves,Exposed Ductwork,Edison Bulbs,Brick,Bamboo,Cotton,Crate and Barrel,Soft Light,Nautical,Nautical,Afternoon,Casual,Rustic,
4
  ,High angle,Art Deco Dining Room,Marble Tabl,Chandelier,intricate Tile Work,Concrete,Sisal,Velvet,West Elm,Hard Light,Coastal,Coastal,Sunset,Laid-back,Minimalist,
Interiorismo.csv CHANGED
@@ -1,4 +1,4 @@
1
- Foto estilo,Marco,Entorno,Estancia,Chimenea,Material 1,Material 2,Material 3,Iluminación,Persianas,Entorno,Mobiliario,Iluminación,Vistas,Hora del día,ambiente,estilo,calidad
2
  Editorial Style Photo,Straight On,Coastal Beach House,Living Room,Wood Burning Fireplace,Stone,Seagrass,Linen,Exposed Beams,Pastels,Beachy,Pottery Barn,Natural Light,Ocean View,Morning,Relaxed,Coastal,4K --ar 16:9
3
  Architectural Style Photo,Low angle,Modern Loft,Bedroom,Electric Fireplace,Brick,Bamboo,Cotton,Recessed Lighting,Bold colors,Nautical,Crate and Barrel,Soft Light,City View,Afternoon,Casual,Rustic,4K --ar 16:9
4
  Interior Style Photo,High angle,Rustic Farmhouse,Dining Room,Gas Fireplace,Concrete,Sisal,Velvet,Crown Molding,Monochromatic color scheme,Coastal,West Elm,Hard Light,Mountain View,Sunset,Laid-back,Minimalist,4K --ar 16:9
 
1
+ Photo style,Framing,Environment,Stay,Fireplace,Material 1,Material 2,Material 3,lighting,Shades,Environment,Furniture,Lighting,Views,Time of the day,atmosphere,style,quality
2
  Editorial Style Photo,Straight On,Coastal Beach House,Living Room,Wood Burning Fireplace,Stone,Seagrass,Linen,Exposed Beams,Pastels,Beachy,Pottery Barn,Natural Light,Ocean View,Morning,Relaxed,Coastal,4K --ar 16:9
3
  Architectural Style Photo,Low angle,Modern Loft,Bedroom,Electric Fireplace,Brick,Bamboo,Cotton,Recessed Lighting,Bold colors,Nautical,Crate and Barrel,Soft Light,City View,Afternoon,Casual,Rustic,4K --ar 16:9
4
  Interior Style Photo,High angle,Rustic Farmhouse,Dining Room,Gas Fireplace,Concrete,Sisal,Velvet,Crown Molding,Monochromatic color scheme,Coastal,West Elm,Hard Light,Mountain View,Sunset,Laid-back,Minimalist,4K --ar 16:9
National Geographics.csv CHANGED
@@ -1,4 +1,4 @@
1
- Animal,Acción,encuadre,traje,lugar,National Geographic,calidad,Enfoque,Película,Calidad
2
  Lions,from below,side view sho,golden hour,Tanzania,National Geographic,4K,sharp focus,Lomography XPro 200,--ar 2:1
3
  male gazelle,standing in tall grass,from below,morning hour,"mist, Tanzania",,8K,deep depth of field,Kodak Gold 200,
4
  male rhino,standing near a water hole,over head shot,sunset hour,EMOTION: Daunting,,,swallow depth of fiel,Fujifilm Pro 400H,
 
1
+ Animal,Action,framing,outfit,place,National Geographic,quality,Focus,Film,Quality
2
  Lions,from below,side view sho,golden hour,Tanzania,National Geographic,4K,sharp focus,Lomography XPro 200,--ar 2:1
3
  male gazelle,standing in tall grass,from below,morning hour,"mist, Tanzania",,8K,deep depth of field,Kodak Gold 200,
4
  male rhino,standing near a water hole,over head shot,sunset hour,EMOTION: Daunting,,,swallow depth of fiel,Fujifilm Pro 400H,
Portadas Libros.csv CHANGED
@@ -1,4 +1,4 @@
1
- Inicio,fondo,contenido del fondo,TEMA,Contenido del tema,ESQUEMA DE COLOR,Esquema de color,COMPOSICIÓN,Composición,ILUMINACIÓN,Iluminación,ESTILO,Estilo,DETALLES,Detalles,CÁMARA,cámera,cámara,calidad,Calidad
2
  Create a photographic image, / BACKGROUND:,Watercolor background with splash effect ,/ SUBJECT:,Black man,/ COLOR SCHEME:,dramatic color scheme,/ COMPOSITION:,city setting,/ LIGHTING:,dramatical lighting,/ STYLE: ,Minimalist,/ DETAILS:,Infinity symbol,/ CAMERA:,Canon 5D Mark III, / Canon 5D Mark II,4K,--ar 2:3
3
  ,,A forest background with a dim light and a magical aura can be perfect for fantasy novel covers,,male torso in suit,,Monochromatic,,A forest with mist or fog,,High Key Lighting,,Dramatic,,Tree of Life,,,,8K,
4
  ,,Nature landscape with mountains and forest in the background,,black man in suit,,Analogous,,An abandoned building or ruin,,Low Key Lighting,,Surreal,,Celtic Knot,,,,,
 
1
+ Start,background,background content,SUBJECT, Subject Content,COLOR SCHEME,Color Scheme,COMPOSITION,Composition,LIGHTING,Lighting,STYLE,Style,DETAILS,Details,CAMERA,cemera,camera,quality,Quality
2
  Create a photographic image, / BACKGROUND:,Watercolor background with splash effect ,/ SUBJECT:,Black man,/ COLOR SCHEME:,dramatic color scheme,/ COMPOSITION:,city setting,/ LIGHTING:,dramatical lighting,/ STYLE: ,Minimalist,/ DETAILS:,Infinity symbol,/ CAMERA:,Canon 5D Mark III, / Canon 5D Mark II,4K,--ar 2:3
3
  ,,A forest background with a dim light and a magical aura can be perfect for fantasy novel covers,,male torso in suit,,Monochromatic,,A forest with mist or fog,,High Key Lighting,,Dramatic,,Tree of Life,,,,8K,
4
  ,,Nature landscape with mountains and forest in the background,,black man in suit,,Analogous,,An abandoned building or ruin,,Low Key Lighting,,Surreal,,Celtic Knot,,,,,
Retratos 2.csv CHANGED
@@ -1,4 +1,4 @@
1
- Estilo fotográfico,encuadre,personaje,Escena,detalles de la piel,belleza,iluminación,profundidad de campo,Artista,Estilo,Texturas,Cámara,Película,Calidad
2
  "Cinematic shot,","Medium shot portrait,",Scandinavian model of the 80's,dancing in a 80's night club,"realistic skin detail,","natural beauty,"," direct sun light with shadows,","sharp focus,","Photoshoot by Annie Leibovitz,","Real Photography,","absolute realism,","real textures,","Canon 5D Mark III,","film grain,",8K F16 --q 5 --ar 9:16
3
  ,,,,"Subtle skin textures,","Serene landscape,","Soft diffused light with no shadows,","Soft focus,","Photoshoot by Mario Testino,","Abstract painting,","stylized surrealism,","Natural materials,","Nikon D850,","Vignette,",8K F16 --q 5 --ar 16:9
4
  ,,,,"Detailed skin pores,","Raw wilderness,","Backlit with silhouette effect,","Shallow focus,","Photoshoot by Steven Meisel,","Sculpture,","retro-futurism,","Artificial materials,","Sony Alpha a7 III,","Depth of field,",8K F16 --q 5 --ar 2:3
 
1
+ Photo Style,framing,character,Scene,skin details,beauty,lighting,deep of field,Artist,Style,Style,Textures,Camara,Film,Quality
2
  "Cinematic shot,","Medium shot portrait,",Scandinavian model of the 80's,dancing in a 80's night club,"realistic skin detail,","natural beauty,"," direct sun light with shadows,","sharp focus,","Photoshoot by Annie Leibovitz,","Real Photography,","absolute realism,","real textures,","Canon 5D Mark III,","film grain,",8K F16 --q 5 --ar 9:16
3
  ,,,,"Subtle skin textures,","Serene landscape,","Soft diffused light with no shadows,","Soft focus,","Photoshoot by Mario Testino,","Abstract painting,","stylized surrealism,","Natural materials,","Nikon D850,","Vignette,",8K F16 --q 5 --ar 16:9
4
  ,,,,"Detailed skin pores,","Raw wilderness,","Backlit with silhouette effect,","Shallow focus,","Photoshoot by Steven Meisel,","Sculpture,","retro-futurism,","Artificial materials,","Sony Alpha a7 III,","Depth of field,",8K F16 --q 5 --ar 2:3
Retratos.csv CHANGED
@@ -1,4 +1,4 @@
1
- Foto Estilo,encuadre,medio,personaje,detalles de la piel,belleza,iluminación,profundidad de campo,Escena,Artista,Estilo,Estilo,Texturas,Camara,Película,Calidad
2
  "Cinematic shot,","Extreme close-up,",portrait of,"beautiful woman with freckles, ","realistic skin detail,","natural beauty,"," direct sun light with shadows,","sharp focus,",Outdoor photoshoot with natural lighting by,"Photoshoot by Annie Leibovitz,","Real Photography,","absolute realism,","real textures,","Canon 5D Mark III,","film grain,",8K F16 --q 5 --ar 9:16
3
  "Street style photo,","Close-up,",ilustration of,"Handsome man with a beard,","Subtle skin textures,","Serene landscape,","Soft diffused light with no shadows,","Soft focus,",Black and white studio photoshoot with dramatic lighting by ,"Photoshoot by Mario Testino,","Abstract painting,","stylized surrealism,","Natural materials,","Nikon D850,","Vignette,",8K F16 --q 5 --ar 16:9
4
  "Romantic sunset portrait,","Medium shot,",oil painting of,"Striking blue-eyed model,","Detailed skin pores,","Raw wilderness,","Backlit with silhouette effect,","Shallow focus,",Fashion photoshoot with vibrant colors and playful poses by ,"Photoshoot by Steven Meisel,","Sculpture,","retro-futurism,","Artificial materials,","Sony Alpha a7 III,","Depth of field,",8K F16 --q 5 --ar 2:3
 
1
+ Photo Style,framing,medium,character,skin details,beauty,lighting,deep of field,Scene,Artist,Style,Style,Textures,Camara,Film,Quality
2
  "Cinematic shot,","Extreme close-up,",portrait of,"beautiful woman with freckles, ","realistic skin detail,","natural beauty,"," direct sun light with shadows,","sharp focus,",Outdoor photoshoot with natural lighting by,"Photoshoot by Annie Leibovitz,","Real Photography,","absolute realism,","real textures,","Canon 5D Mark III,","film grain,",8K F16 --q 5 --ar 9:16
3
  "Street style photo,","Close-up,",ilustration of,"Handsome man with a beard,","Subtle skin textures,","Serene landscape,","Soft diffused light with no shadows,","Soft focus,",Black and white studio photoshoot with dramatic lighting by ,"Photoshoot by Mario Testino,","Abstract painting,","stylized surrealism,","Natural materials,","Nikon D850,","Vignette,",8K F16 --q 5 --ar 16:9
4
  "Romantic sunset portrait,","Medium shot,",oil painting of,"Striking blue-eyed model,","Detailed skin pores,","Raw wilderness,","Backlit with silhouette effect,","Shallow focus,",Fashion photoshoot with vibrant colors and playful poses by ,"Photoshoot by Steven Meisel,","Sculpture,","retro-futurism,","Artificial materials,","Sony Alpha a7 III,","Depth of field,",8K F16 --q 5 --ar 2:3
app.py CHANGED
@@ -15,14 +15,12 @@ def parametroAleatorio(lista):
15
  return res
16
 
17
 
18
- def make_concat_prompt(csv_reader, valoresUnicos):
19
- def concat_prompt(*args):
20
- campos = {campo: parametroAleatorio(valoresUnicos[campo]) for campo in csv_reader.fieldnames}
21
- campos.update({campo: valor for campo, valor in zip(csv_reader.fieldnames, args) if valor})
22
 
23
- prompt = ', '.join([campos[campo] for campo in csv_reader.fieldnames])
24
- return prompt
25
- return concat_prompt
26
 
27
 
28
  csv_files = [f for f in os.listdir() if os.path.isfile(f) and f.endswith('.csv')]
@@ -38,6 +36,9 @@ for file_name in csv_files:
38
  valoresUnicos[campo] = set()
39
  for row in csv_reader:
40
  for campo, valor in row.items():
 
 
 
41
  valoresUnicos[campo].add(valor)
42
 
43
  inputs = [Dropdown(list(valoresUnicos[campo]), label=campo.capitalize()) for campo in valoresUnicos.keys()]
@@ -48,7 +49,7 @@ for file_name in csv_files:
48
 
49
  title = f"Generador Prompts Tecnolitas"
50
  description = '<div align="center"> Selecciona entre los distintos menús desplegables para generar un Prompt creativo, los que dejes en blanco serán elegidos aleatoriamente.</div>'
51
- fn = make_concat_prompt(csv_reader, valoresUnicos)
52
 
53
 
54
  interface = Interface(fn=fn, inputs=inputs, outputs=output_text, title=title, description=description)
 
15
  return res
16
 
17
 
18
+ def concat_prompt(csv_reader, valoresUnicos, *args):
19
+ campos = {campo: parametroAleatorio(valoresUnicos[campo]) for campo in csv_reader.fieldnames}
20
+ campos.update({campo: valor for campo, valor in zip(csv_reader.fieldnames, args) if valor})
 
21
 
22
+ prompt = ', '.join([campos[campo] for campo in csv_reader.fieldnames])
23
+ return prompt
 
24
 
25
 
26
  csv_files = [f for f in os.listdir() if os.path.isfile(f) and f.endswith('.csv')]
 
36
  valoresUnicos[campo] = set()
37
  for row in csv_reader:
38
  for campo, valor in row.items():
39
+ if campo not in valoresUnicos:
40
+ valoresUnicos[campo] = set()
41
+ print(f"Se encontró un nuevo campo {campo} en el archivo {file_name}")
42
  valoresUnicos[campo].add(valor)
43
 
44
  inputs = [Dropdown(list(valoresUnicos[campo]), label=campo.capitalize()) for campo in valoresUnicos.keys()]
 
49
 
50
  title = f"Generador Prompts Tecnolitas"
51
  description = '<div align="center"> Selecciona entre los distintos menús desplegables para generar un Prompt creativo, los que dejes en blanco serán elegidos aleatoriamente.</div>'
52
+ fn = lambda *args: concat_prompt(csv_reader, valoresUnicos, *args)
53
 
54
 
55
  interface = Interface(fn=fn, inputs=inputs, outputs=output_text, title=title, description=description)
tabs.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from contextlib import nullcontext
2
+
3
+ import csv
4
+ import os.path
5
+ import random
6
+ import gradio as gr
7
+ from gradio.components import Textbox, Dropdown
8
+ from gradio import Interface, TabbedInterface
9
+
10
+
11
+ def parametroAleatorio(lista):
12
+ res = random.choice(list(lista))
13
+ while res == '':
14
+ res = random.choice(list(lista))
15
+ return res
16
+
17
+
18
+ def make_concat_prompt(csv_reader, valoresUnicos):
19
+ def concat_prompt(*args):
20
+ campos = {campo: parametroAleatorio(valoresUnicos[campo]) for campo in csv_reader.fieldnames}
21
+ campos.update({campo: valor for campo, valor in zip(csv_reader.fieldnames, args) if valor})
22
+
23
+ prompt = ', '.join([campos[campo] for campo in csv_reader.fieldnames])
24
+ return prompt
25
+ return concat_prompt
26
+
27
+
28
+ csv_files = [f for f in os.listdir() if os.path.isfile(f) and f.endswith('.csv')]
29
+ csv_files.sort() # Ordenar alfabéticamente
30
+
31
+ interfaces = []
32
+ tab_labels = []
33
+ for file_name in csv_files:
34
+ with open(file_name, 'r') as csv_file:
35
+ csv_reader = csv.DictReader(csv_file)
36
+ valoresUnicos = {}
37
+ for campo in csv_reader.fieldnames:
38
+ valoresUnicos[campo] = set()
39
+ for row in csv_reader:
40
+ for campo, valor in row.items():
41
+ valoresUnicos[campo].add(valor)
42
+
43
+ inputs = [Dropdown(list(valoresUnicos[campo]), label=campo.capitalize()) for campo in valoresUnicos.keys()]
44
+ output_text = Textbox(label='Prompt')
45
+
46
+ tab_label = os.path.splitext(file_name)[0].title()
47
+ tab_labels.append(tab_label)
48
+
49
+ title = f"Generador Prompts Tecnolitas"
50
+ description = '<div align="center"> Selecciona entre los distintos menús desplegables para generar un Prompt creativo, los que dejes en blanco serán elegidos aleatoriamente.</div>'
51
+ fn = make_concat_prompt(csv_reader, valoresUnicos)
52
+
53
+
54
+ interface = Interface(fn=fn, inputs=inputs, outputs=output_text, title=title, description=description)
55
+ interfaces.append(interface)
56
+
57
+ tabbed_interface = TabbedInterface(interfaces, tab_labels)
58
+ tabbed_interface.launch()
volumetrics.csv CHANGED
@@ -1,4 +1,4 @@
1
- estilo_fotográfico,encuadre,temperatura_color,cámara,profundidad_de_campo,composición,entorno,sombras,fuentes_de_luz,efectos,tiempo,calidad
2
  scene featuring volumetric lighting,indoor setting,warm color temperature,Straight On,shallow depth of field,dynamic composition,minimalist environment,hard shadows,natural light sources,fog effects,morning time of day,4K --ar 16:9
3
  ,outdoor setting,cool color temperature,Low angle,deep depth of field,static composition,busy environment,soft shadows,artificial light sources,smoke effects,night time of day,
4
  ,Abandoned warehouse,neutral color temperature,High angle,variable depth of field,balanced composition,industrial environment,diffuse shadows,colorful light sources,mist effects,afternoon time of day,
 
1
+ photo_style,setting,color_temperature,camera,depth_of_field,composition,environment,shadows,light_sources,effects,time,quality
2
  scene featuring volumetric lighting,indoor setting,warm color temperature,Straight On,shallow depth of field,dynamic composition,minimalist environment,hard shadows,natural light sources,fog effects,morning time of day,4K --ar 16:9
3
  ,outdoor setting,cool color temperature,Low angle,deep depth of field,static composition,busy environment,soft shadows,artificial light sources,smoke effects,night time of day,
4
  ,Abandoned warehouse,neutral color temperature,High angle,variable depth of field,balanced composition,industrial environment,diffuse shadows,colorful light sources,mist effects,afternoon time of day,