This is code for doing Data Augmentation with GPT systems
Using 10 lines of fake_news.csv we generate <1000 lines of fake_news data
`pip install -r requirements.txt`
Save the data to the same directory that the code is located.
Based on your data type selected the data loader to use for loading in your data.
lang chain document loaders : https://python.langchain.com/en/latest/modules/indexes/document_loaders.html
The current code uses a csv file example and uses a CSV loader to call in the data.
from langchain.document_loaders.csv_loader import CSVLoader
loader = CSVLoader('fake_news.csv')
Generate an OpenAI API key. Documentation on how to do so can be found here :https://platform.openai.com/account/api-keys
Once you generate a key, input the key here:
embeddings = OpenAIEmbeddings(openai_api_key = 'insert_key_here')
Finally run python3 pl.py
or python pl.py
to get your generated data saved to the file format of your choice.