Spaces:
Running
Running
Commit
Β·
e09232a
1
Parent(s):
07a415d
UI - theme
Browse files
app.py
CHANGED
|
@@ -25,6 +25,8 @@ label_mapping = {
|
|
| 25 |
}
|
| 26 |
|
| 27 |
def classify_text(text):
|
|
|
|
|
|
|
| 28 |
inputs = tokenizer(text, return_tensors="pt", truncation=True)
|
| 29 |
inputs = {key: value.to(device) for key, value in inputs.items()}
|
| 30 |
|
|
@@ -52,7 +54,7 @@ description = """
|
|
| 52 |
|
| 53 |
---
|
| 54 |
|
| 55 |
-
Detect AI-generated texts with precision using the new **ModernBERT** model, fine-tuned for machine-generated text detection which capable of identifying 40 different models.
|
| 56 |
|
| 57 |
- π€ - **Identify AI Models:** Reveals which LLM generated the text if detected as AI.
|
| 58 |
- β
- **Human Verification:** Marks human-written text with a green checkmark.
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
def classify_text(text):
|
| 28 |
+
if not text.strip():
|
| 29 |
+
return "----"
|
| 30 |
inputs = tokenizer(text, return_tensors="pt", truncation=True)
|
| 31 |
inputs = {key: value.to(device) for key, value in inputs.items()}
|
| 32 |
|
|
|
|
| 54 |
|
| 55 |
---
|
| 56 |
|
| 57 |
+
Detect AI-generated texts with precision using the new **ModernBERT** model, fine-tuned for machine-generated text detection which is capable of identifying 40 different models.
|
| 58 |
|
| 59 |
- π€ - **Identify AI Models:** Reveals which LLM generated the text if detected as AI.
|
| 60 |
- β
- **Human Verification:** Marks human-written text with a green checkmark.
|