Datasets:
Youssef Benhachem
commited on
Commit
•
8564221
1
Parent(s):
c8bcfeb
debugging
Browse files
KHATT.py
CHANGED
@@ -101,9 +101,10 @@ class KHATT(datasets.GeneratorBasedBuilder):
|
|
101 |
text = ""
|
102 |
|
103 |
elif path.endswith(".txt"):
|
104 |
-
import ipdb; ipdb.set_trace()
|
105 |
|
106 |
text = file.read()
|
|
|
107 |
|
108 |
ex = {"image": {"path": path, "bytes": img_file.read()}, "text": text}
|
109 |
yield idx, ex
|
|
|
101 |
text = ""
|
102 |
|
103 |
elif path.endswith(".txt"):
|
104 |
+
#import ipdb; ipdb.set_trace()
|
105 |
|
106 |
text = file.read()
|
107 |
+
text = text.decode('utf-8')
|
108 |
|
109 |
ex = {"image": {"path": path, "bytes": img_file.read()}, "text": text}
|
110 |
yield idx, ex
|