Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
isthaison committed Dec 10, 2024
2 parents f085687 + 927873b commit 46ac7ab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rag/app/resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def remote_call(filename, binary):
resume = step_two.parse(resume)
return resume
except Exception:
logging.exception("Resume parser error")
logging.exception("Resume parser has not been supported yet!")
return {}


Expand Down
4 changes: 2 additions & 2 deletions rag/nlp/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def question(self, txt, tbl="qa", min_match:float=0.6):
syn = self.syn.lookup(tk)
syn = rag_tokenizer.tokenize(" ".join(syn)).split()
keywords.extend(syn)
syn = ["\"{}\"^{:.4f}".format(s, w / 4.) for s in syn]
syn = ["\"{}\"^{:.4f}".format(s, w / 4.) for s in syn if s]
syns.append(" ".join(syn))

q = ["({}^{:.4f}".format(tk, w) + " {})".format(syn) for (tk, w), syn in zip(tks_w, syns) if tk]
q = ["({}^{:.4f}".format(tk, w) + " {})".format(syn) for (tk, w), syn in zip(tks_w, syns) if tk and not re.match(r"[.^+\(\)-]", tk)]
for i in range(1, len(tks_w)):
q.append(
'"%s %s"^%.4f'
Expand Down
8 changes: 6 additions & 2 deletions web/src/components/edit-tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
};

const handleInputConfirm = () => {
if (inputValue && tags?.indexOf(inputValue) === -1) {
setTags?.([...tags, inputValue]);
if (inputValue && tags) {
const newTags = inputValue
.split(';')
.map((tag) => tag.trim())
.filter((tag) => tag && !tags.includes(tag));
setTags?.([...tags, ...newTags]);
}
setInputVisible(false);
setInputValue('');
Expand Down

0 comments on commit 46ac7ab

Please sign in to comment.