Skip to content

Instantly share code, notes, and snippets.

@HeenaR17
Created December 21, 2020 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HeenaR17/55a23d4a82389d0e8b20c2c9baab7f94 to your computer and use it in GitHub Desktop.
Save HeenaR17/55a23d4a82389d0e8b20c2c9baab7f94 to your computer and use it in GitHub Desktop.
input = "back translation is one of the best data augmentation techniques"
result = english_to_german.generate(english_to_german.encode(input), beam=10)
for r in result:
output = english_to_german.decode(r['tokens'])
print(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment