Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This gist is part of my blogpost on BERT. Find the complete blogpost, covering both theory and hands-on part, here:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This comment has been minimized.

Copy link

@TaylorHawkes TaylorHawkes commented Nov 6, 2020

For some reason when saving that alpha (a) saves as first column and was messing up the training.
I changed that "alpha" column to "poop" and it fixed it. (think it is just saving columns alphabetically, maybe there is better fix here haha)

df_bert = pd.DataFrame({
'text': train_df[1].replace(r'\n', ' ', regex=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment