Spaces:
Sleeping
Sleeping
Commit
·
4dacdc8
1
Parent(s):
7e73b77
handle both ar and eng
Browse files
README.md
CHANGED
|
@@ -1,30 +1,10 @@
|
|
| 1 |
-
# 🤖 AI Text Detector (Improved)
|
| 2 |
-
|
| 3 |
-
This project provides a **FastAPI app** for detecting whether a given text is **AI-generated** or **human-written**.
|
| 4 |
-
Unlike the original version, this detector uses **two signals**:
|
| 5 |
-
|
| 6 |
-
1. **Classifier score** from [`Hello-SimpleAI/chatgpt-detector-roberta`](https://huggingface.co/Hello-SimpleAI/chatgpt-detector-roberta)
|
| 7 |
-
→ Probability that the text is AI-generated.
|
| 8 |
-
|
| 9 |
-
2. **Perplexity score** using **GPT-2**
|
| 10 |
-
→ Measures how “predictable” the text is. Lower perplexity often indicates AI-like fluency.
|
| 11 |
-
|
| 12 |
-
The app then combines both scores into a **final label**: `AI`, `Human`, or `Uncertain`.
|
| 13 |
-
|
| 14 |
---
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
---
|
| 25 |
-
|
| 26 |
-
## 🚀 Running the App
|
| 27 |
-
|
| 28 |
-
### 1. Build the Docker image
|
| 29 |
-
```bash
|
| 30 |
-
docker build -t ai-detector .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: AI Text Detector (Improved)
|
| 3 |
+
emoji: 🤖
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
pinned: false
|
| 9 |
+
app_file: app.py
|
|
|
|
| 10 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|