Skip to content

Commit

Permalink
Remove exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikTromp committed Jan 8, 2024
1 parent 9e5c453 commit 24301ff
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions translate_oasst.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ def batch_translate_madlad(texts, target_lang):

# Decoding outputs
translated_texts = tokenizer.batch_decode(outputs, skip_special_tokens=True)
if len([t for t in translated_texts if t == '']) > 0:
print(texts)
raise Exception("Failed to translate properly")
return translated_texts


Expand Down

0 comments on commit 24301ff

Please sign in to comment.