A recreation of the website gptzero.me which utilizes the OpenAI GPT-2 model to determine whether a piece of text was written by a human or a machine. This program allows you to input a piece of text and it will output a score indicating the likelihood that the text was written by a human.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
To install the necessary libraries, run the following command in your terminal:
pip install openai nltk flask
This command will install the OpenAI library, NLTK, and Flask. The OpenAI library is used to access the GPT-2 model and perform the text generation and scoring. NLTK is used for natural language processing tasks such as tokenization and stemming. Flask is used to create the web interface for the program.
To run the program, simply type the following command in your terminal:
This will start the local server and the program can be accessed in your web browser at http://localhost:8080/
You can input a text in the text area and click on "Submit" button. The program will use the GPT-2 model to generate a similar text and compare the input text with the generated text, based on this it will output a score indicating the likelihood that the text was written by a human.
Additionally, please note that to run this model you need to have credentials to access OpenAI's GPT2 model. You can find more information on how to acquire credentials on the OpenAI website.