fix docker compose issue (#238)

### What problem does this PR solve?

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

Issue link:#[[Link the issue
here](https://github.com/infiniflow/ragflow/issues/226)]

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
KevinHuSh
2024-04-07 09:04:32 +08:00
committed by GitHub
parent b4abbe5d93
commit 23b448cf96
14 changed files with 195 additions and 234 deletions

View File

@ -68,6 +68,7 @@ def bullets_category(sections):
def is_english(texts):
eng = 0
if not texts: return False
for t in texts:
if re.match(r"[a-zA-Z]{2,}", t.strip()):
eng += 1
@ -112,8 +113,8 @@ def tokenize_table(tbls, doc, eng, batch_size=10):
d = copy.deepcopy(doc)
tokenize(d, rows, eng)
d["content_with_weight"] = rows
d["image"] = img
add_positions(d, poss)
if img: d["image"] = img
if poss: add_positions(d, poss)
res.append(d)
continue
de = "; " if eng else " "

View File

@ -46,7 +46,7 @@ class Dealer:
"k": topk,
"similarity": sim,
"num_candidates": topk * 2,
"query_vector": qv
"query_vector": list(qv)
}
def search(self, req, idxnm, emb_mdl=None):