Xhaheen commited on
Commit
375b896
β€’
1 Parent(s): 3fae3d0

Update lexica.py

Browse files
Files changed (1) hide show
  1. lexica.py +5 -2
lexica.py CHANGED
@@ -22,6 +22,7 @@ def lexica(design,n):
22
 
23
  image_urls = []
24
  image_prompts = []
 
25
 
26
  for key, value in data.items():
27
  for i in range(n):
@@ -32,6 +33,7 @@ def lexica(design,n):
32
 
33
 
34
  image_prompts.append(value[i]['prompt'])
 
35
 
36
  images = []
37
 
@@ -47,10 +49,11 @@ def lexica(design,n):
47
  images.append(image)
48
 
49
 
50
- df = pd.DataFrame(image_prompts, columns=["Lexica Prompt"], index=range(1, len(image_prompts)+1))
51
 
52
 
53
- df.index.name = "Sr. No."
 
54
 
55
 
56
  for image in images:
 
22
 
23
  image_urls = []
24
  image_prompts = []
25
+ image_gallery=[]
26
 
27
  for key, value in data.items():
28
  for i in range(n):
 
33
 
34
 
35
  image_prompts.append(value[i]['prompt'])
36
+ image_gallery.append(value[i]['gallery'])
37
 
38
  images = []
39
 
 
49
  images.append(image)
50
 
51
 
52
+ # df = pd.DataFrame(image_prompts, columns=["Lexica Prompt"], index=range(1, len(image_prompts)+1))
53
 
54
 
55
+ # df.index.name = "Sr. No."
56
+ df = pd.DataFrame({'image_prompts': image_prompts, 'image_gallery': image_gallery})
57
 
58
 
59
  for image in images: