Skip to content

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.

Notifications You must be signed in to change notification settings

Alex-Steiner-Dev/GPT-Zero

Repository files navigation

GPT-Zero

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.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Python 3.9 or higher
  • The OpenAI library
  • NLPT (Natural Language Toolkit)
  • Flask (Web framework)

Installing

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.

Running the program

To run the program, simply type the following command in your terminal:

./run.sh

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.

Built With

  • Python - Programming language
  • OpenAI - AI library
  • NLTK - Natural Language Toolkit
  • Flask - Web framework

Author

Acknowledgments

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.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published