Essay-Grader's picture
Now Live
7c65163
metadata
title: Detection and Plagiarism Check
emoji: πŸ•΅οΈβ€β™‚οΈ
colorFrom: indigo
colorTo: blue
sdk: docker
app_file: Dockerfile
pinned: false

Detection and Plagiarism Check API πŸ•΅οΈβ€β™‚οΈ

This API uses advanced AI models to evaluate essays for:

  • AI Content Detection: Identifies if the content was written by an AI.
  • Internal Plagiarism Detection: Detects repetitive patterns and similarities within the text.

Endpoints

GET /health

Check the API health and model loading status.

Response:

{
  "model_loaded": true,
  "hub_accessible": true,
  "pdf_processing": true
}


πŸ“„ POST /analyze
Upload a PDF essay for comprehensive analysis.

Request:

Content-Type: multipart/form-data

Body: file (PDF document)

**Response:**

{
  "analysis": {
    "ai_detection": {
      "human_written": 47.22,
      "ai_generated": 52.78
    },
    "plagiarism_score": 0
  },
  "status": "success"
}




## Usage Examples

### Using cURL:

curl -X 'POST' \
  'https://essay-grader-detection-and-plagiarism-check.hf.space/analyze' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@your_essay.pdf'

### Using Python Requests:

import requests

url = "https://essay-grader-detection-and-plagiarism-check.hf.space/analyze"
files = {"file": open("your_essay.pdf", "rb")}

response = requests.post(url, files=files)
result = response.json()
print(result)


### Technical Stack

AI Content Detection: RoBERTa-based custom fine-tuned model.

Internal Plagiarism Detection: SentenceTransformers (semantic similarity analysis).

PDF Text Extraction: PyPDF2.

Framework: FastAPI.

Deployment: Docker + Hugging Face Spaces. 


Credits:

Created by: Christian Mpambira (BED-COM-22-20)