Skip to content

Use Fast.ai's NLP deep learning methods to imitate a Reddit user

License

Notifications You must be signed in to change notification settings

xjdeng/fastai_reddit

Repository files navigation

fastai_reddit

Here, we'll use Fast.ai's Language Model to imitate another Reddit user.

Initially, I plan to create an iPython notebook similar to Fast.ai's. Later, I might release .py libraries.

You'll need to setup API access in your Reddit account according to these instructions and put the API keys in a file named "credentials.key".

You can see a sample credential file in "sample_credentials.key".

Requirements:

  • fast.ai (make sure you also 'activate fastai')
  • praw
  • Beautifulsoup 4 (conda install beautifulsoup4 or pip install beautifulsoup4)
  • spacy
    • conda install spacy (or pip install spacy)
    • python -m spacy download en (may need to run this as admin in Windows)

Notebooks:

  • user.ipynb: Trains a model to imitate a user's last 1000 comments and self texts
  • subreddit.ipynb: Trains a model to imitate a subreddit's top 1000 submissions and its comments

Ignore the "main_files.ipynb" notebook for now (it was an experiment I did earlier.)

About

Use Fast.ai's NLP deep learning methods to imitate a Reddit user

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published