Last active
August 9, 2020 04:21
-
-
Save agastidukare/6996c42d9da78bfd2eb1850fb5a89d41 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
data_lm = (TextList | |
.from_csv(path, 'Tweets.csv', cols='text') | |
#Where are the text? Column 'text' of tweets.csv | |
.split_by_rand_pct(0.2) | |
#How to split it? Randomly with the default 20% in valid | |
.label_for_lm() | |
#Label it for a language model | |
.databunch(bs=48)) | |
#Finally we convert to a DataBunch | |
data_lm.show_batch() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment