Update README.md
Browse files
README.md
CHANGED
@@ -22,7 +22,10 @@ labels_map = {
|
|
22 |
'post': '__label__5', '__label__5': 'post'}
|
23 |
|
24 |
with open(sample_decision) as inf:
|
25 |
-
|
|
|
|
|
|
|
26 |
nchars = 150
|
27 |
for line in text.split(NL):
|
28 |
pred = labels_map[model.predict(line.strip())[0][0]]
|
|
|
22 |
'post': '__label__5', '__label__5': 'post'}
|
23 |
|
24 |
with open(sample_decision) as inf:
|
25 |
+
paras = [p for p in inf.read().split(NL) if p.strip()]
|
26 |
+
random.shuffle(paras)
|
27 |
+
text = NL.join(paras)
|
28 |
+
|
29 |
nchars = 150
|
30 |
for line in text.split(NL):
|
31 |
pred = labels_map[model.predict(line.strip())[0][0]]
|