利用OpenAI GPT-2模型来确定一段文本是由人还是机器编写的。这个程序允许你输入一段文本,它将输出一个分数,表明文本是由人编写的可能性。

Alex Steiner 4364e34c32 Update README.md 2 月之前
.vscode 80262d599e Updates 1 年之前
__pycache__ 0ca49ff853 Fix 1 年之前
static 61a7947e69 Load Button 1 年之前
templates 8e933c5c80 Finished 1 年之前
.DS_Store 1c4025254f Percentage 1 年之前
.gitattributes 80262d599e Updates 1 年之前
.gitignore 80262d599e Updates 1 年之前
README.md 4364e34c32 Update README.md 2 月之前
burstiness.py 87468b488f Burstiness API 1 年之前
evaluate.py ce5fccaed7 Fixes 1 年之前
main.py 0e85cb8a9a Fix 1 年之前
perplexity.py 7352135b5d Revert 1 年之前
run.sh 863b6b570e CSS 1 年之前
server.py 863b6b570e CSS 1 年之前
utils.py 0ca49ff853 Fix 1 年之前

README.md

GPT-Zero

A recreation of the website gptzero.me which utilizes the OpenAI GPT-4 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-4 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-4 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.