pird-api / README.md
MohsinEli's picture
PIRD REST API: FastAPI + CORS, encoder-only checkpoint
e58f648 verified
|
Raw
History Blame Contribute Delete
738 Bytes
metadata
title: PIRD API
emoji: πŸ“œ
colorFrom: yellow
colorTo: gray
sdk: docker
app_port: 7860
pinned: false
license: mit

PIRD API β€” Paraphrase-Robust AI-Text Detection as a REST service

FastAPI wrapper around the trained PIRD checkpoint. CORS is open so browser front-ends (e.g. the Next.js site on Vercel) can call it directly.

Endpoints

  • GET / β€” service info / health.
  • POST /predict β€” body {"text": "..."} (β‰₯ 20 words) β†’ {"p_ai": 0.97, "label": "ai", "words": 42}.

p_ai is a temperature-calibrated probability that the passage is AI-generated.

Notes

  • Runs on CPU (free tier); single-text inference β‰ˆ 1–2 s.
  • Research demo β€” probabilistic output; do not use as sole evidence of misconduct.