A example of how to build a classifier using GPT
-
Data-Viz: folder with relevant data for producing confusion matrices
-
Data: subset of the data to run the script
-
Examples: Two csvs, which were used to feed the classifier the examples for few shot learning
-
Output: The output from our classification task
-
Skills-share-example.ipynb: the script you can run to follow along
This is an example of how to use the OpenAI API to leverage the capabilities of GPT for social science research, demoing stuff I learned at SICSS :). Slides are here.
In order for this script to run, you will need to generate an API Key via OpenAI's website. You can do that here. Please do not share this with anyone, store it in an .env file, and add it to a .gitignore file to avoid any breaches.