freemt commited on
Commit
5dff3c8
1 Parent(s): e50699c

Fix text2lists missing last batch bug, append -> append

Browse files
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(l5) == 5
 
13
  # assert "国际\n中\n双语" in l1[0]
14
 
15
  assert len(l1) == 4
16
+ assert len(l2) == 5