Team Ai
Apppublic

theyashkhatri/AuthenticPlagAI

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
App README

๐Ÿ›ก๏ธ AuthenticPlagAI

An AI-Driven Plagiarism Detection and Content Authentication System with Humanization Module

A clean, single-file Streamlit app to detect plagiarism in any text or document and rewrite AI-generated content to sound naturally human.


๐Ÿš€ Quick Start

bash
# 1. Install dependencies
pip install -r requirements.txt

# 2. Run the app
streamlit run app.py

Opens at http://localhost:8501


โœจ Features

๐Ÿ“ Check Text

Paste any essay, article, or content directly into the text box and click Check Plagiarism to instantly get a plagiarism score with a full breakdown.

๐Ÿ“‚ Check File

Upload a .txt, .pdf, or .docx file. A live preview of the document appears before you run the check.

โœจ AI Humaniser

Paste AI-generated or flagged text and rewrite it to sound authentically human using Google Gemini.

  • โ€”5 tone options: Natural, Academic, Professional, Creative, Plain
  • โ€”3 intensity levels: Light Touch, Moderate, Heavy Rewrite
  • โ€”Side-by-side original vs humanised view
  • โ€”Download the result as .txt

๐Ÿ“Š How Plagiarism Scoring Works

The score is computed using three internal signals:

SignalWeightDescription
N-Gram Repetition50%How much of the text repeats itself in 5-word chunks
Stopword Ratio25%Proportion of generic/common words
Sentence Uniformity25%How uniform sentence lengths are (AI text tends to be very uniform)
ScoreVerdict
< 25%โœ… Likely Original
25โ€“55%โš ๏ธ Moderate Risk
> 55%๐Ÿšจ High Plagiarism Risk

๐Ÿ› ๏ธ Tech Stack

LayerTechnology
UIStreamlit
Plagiarism Analysisscikit-learn, Python difflib
AI HumaniserGoogle Gemini 2.0 Flash
PDF Parsingpdfplumber
DOCX Parsingpython-docx

๐Ÿ”‘ Gemini API Key (Humaniser only)

The plagiarism checker works without any API key. The Humaniser tab requires a free Google Gemini API key:

  1. 1.Go to aistudio.google.com
  2. 2.Click Get API Key โ†’ Create API Key
  3. 3.Paste it into the sidebar of the app
Free tier: 15 requests/min, 1M tokens/day โ€” no credit card needed.

๐Ÿ“ฆ Requirements

streamlit>=1.32.0
scikit-learn>=1.4.0
pandas>=2.0.0
google-generativeai>=0.7.0
pdfplumber>=0.10.0
python-docx>=1.1.0

โ˜๏ธ Deploy to Hugging Face Spaces

  1. 1.Create a new Space at huggingface.co/spaces
  2. 2.Select Streamlit as the SDK
  3. 3.Upload app.py, requirements.txt, and README.md
  4. 4.The Space builds and deploys automatically

๐Ÿ“‚ Project Structure

AuthenticPlagAI/
โ”œโ”€โ”€ app.py            # Entire application (single file)
โ”œโ”€โ”€ requirements.txt  # Python dependencies
โ””โ”€โ”€ README.md         # This file

๐Ÿ“„ License

MIT License โ€” free to use, modify, and distribute.