a-alnaggar
commited on
Commit
•
9e79811
1
Parent(s):
3fa033e
Update khatt-paragraphs.py
Browse files- khatt-paragraphs.py +1 -2
khatt-paragraphs.py
CHANGED
@@ -51,9 +51,8 @@ class KhattPara(datasets.GeneratorBasedBuilder):
|
|
51 |
|
52 |
def _generate_examples(self, images, text_archive_path):
|
53 |
"""Returns inverted image and Arabic text."""
|
54 |
-
print(os.listdir(text_archive_path))
|
55 |
for idx, (filepath, image) in enumerate(images):
|
56 |
-
text_path = os.path.basename(filepath)[:-4] + ".txt"
|
57 |
text = self.read_arabic_text_file(os.path.join(text_archive_path,text_path))
|
58 |
|
59 |
yield idx, {
|
|
|
51 |
|
52 |
def _generate_examples(self, images, text_archive_path):
|
53 |
"""Returns inverted image and Arabic text."""
|
|
|
54 |
for idx, (filepath, image) in enumerate(images):
|
55 |
+
text_path = os.path.join("proc_text", str(os.path.basename(filepath)[:-4] + ".txt"))
|
56 |
text = self.read_arabic_text_file(os.path.join(text_archive_path,text_path))
|
57 |
|
58 |
yield idx, {
|