KevinHuSh commited on
Commit
28b6673
·
1 Parent(s): e7e8c6b

fix es exception (#298)

Browse files

### What problem does this PR solve?

Issue link:#295
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Files changed (1) hide show
  1. rag/nlp/__init__.py +3 -3
rag/nlp/__init__.py CHANGED
@@ -135,9 +135,9 @@ def add_positions(d, poss):
135
  d["position_int"] = []
136
  d["top_int"] = []
137
  for pn, left, right, top, bottom in poss:
138
- d["page_num_int"].append(pn + 1)
139
- d["top_int"].append(top)
140
- d["position_int"].append((pn + 1, left, right, top, bottom))
141
 
142
 
143
  def remove_contents_table(sections, eng=False):
 
135
  d["position_int"] = []
136
  d["top_int"] = []
137
  for pn, left, right, top, bottom in poss:
138
+ d["page_num_int"].append(int(pn + 1))
139
+ d["top_int"].append(int(top))
140
+ d["position_int"].append((int(pn + 1), int(left), int(right), int(top), int(bottom)))
141
 
142
 
143
  def remove_contents_table(sections, eng=False):