- Download Repository
- Install Miniconda
- Setup Reddit API Key
- Install Necessary Libraries
The GitHub Repo is located at https://github.com/AlbertLeeUCSF/reddit_2023. From there, you can download the entire repo as a zip file, and unzip it on your computer.
You'll need to install Miniconda to get Python and other libraries required for this project. The download links for the installation files of Miniconda are located at https://docs.conda.io/en/main/miniconda.html#installing
Follow the instructions on https://rymur.github.io/setup to create a new app on Reddit. Once you create the new application, not the personal use script, secret, and developers on the page that summarizes the app's information.
Create a new file inside of the unzipped repo on your computer called reddit_api.json. Add the following details to reddit_api.json and save the file.
{
"client_id": "replace_with_personal_use_script",
"secret": "replace_with_secret",
"user_agent": "replace_with_developer"
}
Open command line (terminal or command prompt) and navigate to the repository using the cd command.
cd replace_with_your_path/reddit_2023
Then install virtualenv using conda install ....
conda install virtualenv
Then create a new virtual environment call env inside of the repo.
python -m venv env
Now let's activate the environment. Be sure to do this each time you need to work on the project.
. env/bin/activate
Now that the environment has been activated, you can go ahead and install the libraries listed in requirements.txt.
pip install -r requirements.txt
At this point, you can now access the project in Jupyter.
jupyter lab
https://huggingface.co/kc928/AI4ALL-UCSF-Reddit-2023-Age
https://huggingface.co/kc928/AI4ALL-UCSF-Reddit-2023-Gender
https://huggingface.co/kc928/AI4ALL-UCSF-Reddit-2023-Subject
Keep in mind that there are already labels ready to train the model, but in case you want to use your own data delete the ner_labels.json and classification_labels.json files and begin labelling on your own with the labelling notebooks.