wintercoming6 commited on
Commit
39f8052
1 Parent(s): c63eb1b

Update artwork_for_sdxl.py

Browse files
Files changed (1) hide show
  1. artwork_for_sdxl.py +10 -9
artwork_for_sdxl.py CHANGED
@@ -21,6 +21,7 @@ import datasets
21
  from PIL import Image
22
  import requests
23
  import io
 
24
 
25
 
26
 
@@ -74,20 +75,20 @@ class Artwork(datasets.GeneratorBasedBuilder):
74
 
75
  def _generate_examples(self, files):
76
  cnt=0
77
- for path in files.itertuples():
78
  print(cnt)
79
  cnt+=1
80
- print(path)
81
- print(path.prompt)
82
- print(type(path.prompt))
83
- print(path.file_name)
84
- print(type(path.file_name))
85
  # print current os directory
86
- p=path.prompt
87
- n=path.file_name
88
 
89
  print(os.getcwd())
90
- img = self.download_image(_image_url+ path.file_name)
91
  print(img)
92
  yield {
93
  "prompt": p,
 
21
  from PIL import Image
22
  import requests
23
  import io
24
+ import tfds
25
 
26
 
27
 
 
75
 
76
  def _generate_examples(self, files):
77
  cnt=0
78
+ for _, row in files.iterrows():
79
  print(cnt)
80
  cnt+=1
81
+ print(row)
82
+ print(row.prompt)
83
+ print(type(row.prompt))
84
+ print(row.file_name)
85
+ print(type(row.file_name))
86
  # print current os directory
87
+ p=row.prompt
88
+ n=row.file_name
89
 
90
  print(os.getcwd())
91
+ img = self.download_image(_image_url+ row.file_name)
92
  print(img)
93
  yield {
94
  "prompt": p,