oo-method-test / scripts /import datasets.py
Edward J. Schwartz
update script
e17a927
raw
history blame contribute delete
No virus
409 Bytes
import datasets
import subprocess
subprocess.check("mkdir -p /tmp/somewhere", shell=True)
subprocess.check("find . -name '*.csv' | tar -T - -c | tar -C /tmp/somewhere -x", shell=True)
ds = datasets.load_dataset("csv", data_dir="/tmp/somewhere")
ds = ds.class_encode_column('Type')
ds['combined'] = ds['train']
del ds['train']
print("ds.push_to_hub('ejschwartz/oo-method-test')")
import IPython
IPython.embed()