Skip to content

Instantly share code, notes, and snippets.

@aribornstein
Last active May 20, 2021 19:55
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 aribornstein/71b274307418ccd5974952d144d7ce7f to your computer and use it in GitHub Desktop.
Save aribornstein/71b274307418ccd5974952d144d7ce7f to your computer and use it in GitHub Desktop.
# Load tha data
datamodule = TranslationData.from_csv("input", "target", train_file="./train.csv")
# Load the model from a checkpoint
model = TranslationTask.load_from_checkpoint("<https://flash-weights.s3.amazonaws.com/translation_model_en_ro.pt>")
# Translate a sentence!
model.predict(["BBC News went to meet one of the project's first graduates."])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment