km8oz
commited on
Commit
·
91765ed
1
Parent(s):
24f72f5
ignore1
Browse files- demolist.csv +23 -0
- icons_dataset.py +8 -1
demolist.csv
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
word,url
|
2 |
+
Forester,https://cdn.svgapi.com/vector/26281/forester-house.svg
|
3 |
+
forint,https://cdn.svgapi.com/vector/128808/forint.svg
|
4 |
+
forint,https://cdn.svgapi.com/vector/156675/hungary-forint-currency-symbol.svg
|
5 |
+
forint,https://cdn.svgapi.com/vector/164058/hungary-forint-currency-symbol.svg
|
6 |
+
fork,https://cdn.svgapi.com/vector/48708/fork.svg
|
7 |
+
forklift,https://cdn.svgapi.com/vector/88661/forklift.svg
|
8 |
+
forklift,https://cdn.svgapi.com/vector/17780/forklift.svg
|
9 |
+
Forks,https://cdn.svgapi.com/vector/47227/forks-for-meat.svg
|
10 |
+
Forks,https://cdn.svgapi.com/vector/16952/forks-set-for-kitchen.svg
|
11 |
+
Forks,https://cdn.svgapi.com/vector/12309/plate-and-forks-couple-from-top-view.svg
|
12 |
+
form,https://cdn.svgapi.com/vector/26760/education-form.svg
|
13 |
+
form,https://cdn.svgapi.com/vector/1677/education-form.svg
|
14 |
+
formal,https://cdn.svgapi.com/vector/41093/formal-shirt.svg
|
15 |
+
format,https://cdn.svgapi.com/vector/35288/mp3-format.svg
|
16 |
+
formats,https://cdn.svgapi.com/vector/273803/file-formats.svg
|
17 |
+
formats,https://cdn.svgapi.com/vector/280750/file-formats-document.svg
|
18 |
+
formatting,https://cdn.svgapi.com/vector/263823/text-formatting.svg
|
19 |
+
formatting,https://cdn.svgapi.com/vector/263727/text-formatting-ui.svg
|
20 |
+
formatting,https://cdn.svgapi.com/vector/191543/justify-align-text-formatting.svg
|
21 |
+
formed,https://cdn.svgapi.com/vector/47237/star-of-six-points-formed-by-triangles-with-and-hexagon-center.svg
|
22 |
+
forming,https://cdn.svgapi.com/vector/58022/lines-forming-a-box.svg
|
23 |
+
forming,https://cdn.svgapi.com/vector/173718/twigs-forming-a-heart.svg
|
icons_dataset.py
CHANGED
@@ -8,6 +8,7 @@ _HOMEPAGE = "https://text_to_icons.kmoz.dev/#dataset"
|
|
8 |
_DESCRIPTION = "svgs icons classified under dictionary words"
|
9 |
_CITATION = "english dictionary(oxford), svgapi.org"
|
10 |
_LICENSE = "MIT"
|
|
|
11 |
def svg_url_to_image(svg_url):
|
12 |
try:
|
13 |
headers = {
|
@@ -46,7 +47,7 @@ class SvgsIcons(datasets.GeneratorBasedBuilder):
|
|
46 |
license=_LICENSE,
|
47 |
)
|
48 |
def _split_generators(self, dl_manager):
|
49 |
-
dir = dl_manager.download_and_extract(
|
50 |
return [
|
51 |
datasets.SplitGenerator(
|
52 |
name=datasets.Split.TRAIN,
|
@@ -54,6 +55,12 @@ class SvgsIcons(datasets.GeneratorBasedBuilder):
|
|
54 |
"filepath": os.path.join(dir),
|
55 |
},
|
56 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
]
|
58 |
def _generate_examples(self, filepath):
|
59 |
with open(filepath, encoding="utf-8") as csv_file:
|
|
|
8 |
_DESCRIPTION = "svgs icons classified under dictionary words"
|
9 |
_CITATION = "english dictionary(oxford), svgapi.org"
|
10 |
_LICENSE = "MIT"
|
11 |
+
_URL = "https://raw.githubusercontent.com/KM8Oz/icons_svgs_dataset/main/icons_dataset.csv"
|
12 |
def svg_url_to_image(svg_url):
|
13 |
try:
|
14 |
headers = {
|
|
|
47 |
license=_LICENSE,
|
48 |
)
|
49 |
def _split_generators(self, dl_manager):
|
50 |
+
dir = dl_manager.download_and_extract(_URL)
|
51 |
return [
|
52 |
datasets.SplitGenerator(
|
53 |
name=datasets.Split.TRAIN,
|
|
|
55 |
"filepath": os.path.join(dir),
|
56 |
},
|
57 |
),
|
58 |
+
datasets.SplitGenerator(
|
59 |
+
name=datasets.Split.VALIDATION,
|
60 |
+
gen_kwargs={
|
61 |
+
"filepath": os.path.join("demolist.csv"),
|
62 |
+
},
|
63 |
+
),
|
64 |
]
|
65 |
def _generate_examples(self, filepath):
|
66 |
with open(filepath, encoding="utf-8") as csv_file:
|