Last active
May 5, 2022 21:39
-
-
Save YiLi225/4bbd58f0b0231fc909becd6050b211c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install: !pip install next_word_prediction | |
# curText = doc_set[1135957] | |
from next_word_prediction import GPT2 | |
gpt2 = GPT2() | |
# Predict the next word after 'vegetarian' | |
gpt2.predict_next(curText.replace('[MASK]', ''), 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment