commit files to HF hub
Browse files- youtube-transcription.py +3 -1
youtube-transcription.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import datasets
|
|
|
2 |
|
3 |
_CITATION = """\
|
4 |
@InProceedings{huggingface:dataset,
|
@@ -56,8 +57,9 @@ class DhivehiCorpus(datasets.GeneratorBasedBuilder):
|
|
56 |
|
57 |
def _generate_examples(self, filepath, split):
|
58 |
with open(filepath, encoding="utf8") as f:
|
|
|
59 |
id_ = 0
|
60 |
-
for doc in
|
61 |
data = {
|
62 |
"video_id": doc["video_id"],
|
63 |
"text": doc["text"],
|
|
|
1 |
import datasets
|
2 |
+
import json
|
3 |
|
4 |
_CITATION = """\
|
5 |
@InProceedings{huggingface:dataset,
|
|
|
57 |
|
58 |
def _generate_examples(self, filepath, split):
|
59 |
with open(filepath, encoding="utf8") as f:
|
60 |
+
documents = json.load(f)
|
61 |
id_ = 0
|
62 |
+
for doc in documents:
|
63 |
data = {
|
64 |
"video_id": doc["video_id"],
|
65 |
"text": doc["text"],
|