Commit
•
39f8052
1
Parent(s):
c63eb1b
Update artwork_for_sdxl.py
Browse files- 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
|
78 |
print(cnt)
|
79 |
cnt+=1
|
80 |
-
print(
|
81 |
-
print(
|
82 |
-
print(type(
|
83 |
-
print(
|
84 |
-
print(type(
|
85 |
# print current os directory
|
86 |
-
p=
|
87 |
-
n=
|
88 |
|
89 |
print(os.getcwd())
|
90 |
-
img = self.download_image(_image_url+
|
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,
|