Skip to content

NodeJs and JavaScript App for detecting AI Written Articles.

License

Notifications You must be signed in to change notification settings

rafay99-epic/GPTInspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 GPTInspector - Human vs AI Text Detection

MIT License NodeJS

👋 Welcome to GPTInspector, a simple tool to detect whether the text is written by a human 🧑 or generated by AI 🤖. This project uses the powerful ChatGPT Detector RoBERTa model from Hugging Face, integrated through API calls and built with JavaScript, EJS, and Node.js.

🌟 Features

  • 🌍 Detect AI-Generated Text: Quickly analyze if a text was produced by a human or AI.
  • 📡 Hugging Face API: Leverages Hugging Face's state-of-the-art ChatGPT Detector.
  • 💻 User-friendly Interface: Powered by EJS templating engine for dynamic and responsive UI.
  • ⚡️ Fast and Efficient: Lightning-fast detection process with a simple API call.

🚧 How It Works

  1. 📝 Submit Text: Enter a piece of text you want to analyze.
  2. 🔍 Detection: The text is sent to the Hugging Face model through an API call.
  3. 🧑‍🤝‍🧑 Results: The app tells you if the text is AI-generated or human-written based on model predictions.

🔧 Tech Stack

  • JavaScript: Core programming language for the application.
  • Node.js: Backend server runtime.
  • EJS: Templating engine for dynamic rendering.
  • Express.js: Web framework for Node.js.
  • Hugging Face API: AI model integration.

🚀 Quick Start

  1. Clone the repository:

    git clone https://github.com/rafay99-epic/GPTInspector.git
    cd GPTInspector
  2. Install dependencies:

    npm install
  3. Create your API key from Hugging Face and add it to your environment variables:

    export HUGGINGFACE_API_KEY=your_api_key_here
  4. Run the app:

    npm start
  5. Visit the app in your browser at:

    http://localhost:1313

⚙️ Configuration

Make sure to configure your Hugging Face API key in the environment. You can set this up in a .env file:

HUGGINGFACE_API_KEY=your_api_key_here

📂 Project Structure

📦 GPTInspector
├── 📁 public              # Static files (CSS, images)
├── 📁 views               # EJS templates for the frontend
├── 📄 app.js              # Main Node.js application
├── 📄 package.json        # Project dependencies
├── 📄 .env                # Environment variables
└── 📄 README.md           # Project documentation

🤝 Contributing

Feel free to submit issues or pull requests. Let's make this project even better! 🎉

🛡️ License

This project is licensed under the MIT License - see the LICENSE file for details.

💡 Inspiration

Inspired by the need for better understanding of AI-generated content in the growing world of NLP and generative AI. Special thanks to Hugging Face for their incredible models!

📬 Contact

If you have any questions or feedback, feel free to reach out:


Enjoy using GPTInspector! 😊