Skip to content

Instantly share code, notes, and snippets.

@aribornstein
Last active May 20, 2021 19:53
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/cfc80cccaf7a6a20f84bb67cb88b9588 to your computer and use it in GitHub Desktop.
Save aribornstein/cfc80cccaf7a6a20f84bb67cb88b9588 to your computer and use it in GitHub Desktop.
# Load tha data
datamodule = SummarizationData.from_csv("input", "target", train_file="./train.csv",)
# Build the model
model = SummarizationTask()
# Create the trainer. Run once on data
trainer = Trainer()
# Fine-tune the model
trainer.finetune(model, datamodule=datamodule)
# Predict
model.predict(["Text to Summarize Goes Here"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment