europarl-scandinavian / src /push_corpus.py
kardosdrur's picture
Added source files
9c5a8e0
raw
history blame
345 Bytes
"""Pushes corpus to hub."""
from functools import partial
import polars as pl
from datasets import Dataset
corpus = pl.read_parquet("corpus.parquet")
dataset = Dataset.from_generator(partial(corpus.iter_rows, named=True))
dataset = dataset.train_test_split(test_size=0.2, shuffle=True)
dataset.push_to_hub("kardosdrur/europarl-scandinavian")