This commit is contained in:
zhaojinghao 2022-12-08 15:53:11 +08:00
parent 7d080b817d
commit ee184052ce
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ def text_analysis(text):
def text_simi(src, tgt):
score = sts([(src, tgt)])[0]
logger.info(f"相似度得分:{score}")
result = ["negative", "positive"][round(score)]
return result