fix QWenSeq2txt bug (#2245)

### What problem does this PR solve?

#2243

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-09-04 18:25:43 +08:00
committed by GitHub
parent 9b4cceb3f7
commit 0fe19f3fbc
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ class QWenSeq2txt(Base):
ans = ""
if result.status_code == HTTPStatus.OK:
for sentence in result.get_sentence():
ans += str(sentence + '\n')
ans += sentence.text.decode('utf-8') + '\n'
return ans, num_tokens_from_string(ans)
return "**ERROR**: " + result.message, 0