Spaces:
Build error
Build error
freemt
commited on
Commit
•
5dff3c8
1
Parent(s):
e50699c
Fix text2lists missing last batch bug, append -> append
Browse files- gradio_queue.db +0 -0
- img/plt.png +0 -0
- radiobee/text2lists.py +4 -2
- tests/test_text2lists_bug2.py +1 -1
gradio_queue.db
CHANGED
Binary files a/gradio_queue.db and b/gradio_queue.db differ
|
|
img/plt.png
CHANGED
radiobee/text2lists.py
CHANGED
@@ -61,9 +61,11 @@ def text2lists(
|
|
61 |
res.append(elm)
|
62 |
else:
|
63 |
if left:
|
64 |
-
list1.append("\n".join(res))
|
|
|
65 |
else:
|
66 |
-
list2.append("\n".join(res))
|
|
|
67 |
left = not left
|
68 |
|
69 |
res = [elm]
|
|
|
61 |
res.append(elm)
|
62 |
else:
|
63 |
if left:
|
64 |
+
# list1.append("\n".join(res))
|
65 |
+
list1.extend(res)
|
66 |
else:
|
67 |
+
# list2.append("\n".join(res))
|
68 |
+
list2.extend(res)
|
69 |
left = not left
|
70 |
|
71 |
res = [elm]
|
tests/test_text2lists_bug2.py
CHANGED
@@ -13,4 +13,4 @@ def test_text2lists_bug2():
|
|
13 |
# assert "国际\n中\n双语" in l1[0]
|
14 |
|
15 |
assert len(l1) == 4
|
16 |
-
assert len(
|
|
|
13 |
# assert "国际\n中\n双语" in l1[0]
|
14 |
|
15 |
assert len(l1) == 4
|
16 |
+
assert len(l2) == 5
|