Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,15 @@ from spellchecker import SpellChecker
|
|
9 |
import re
|
10 |
import inflect
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
# Initialize the English text classification pipeline for AI detection
|
13 |
pipeline_en = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-detector-roberta")
|
14 |
|
|
|
9 |
import re
|
10 |
import inflect
|
11 |
|
12 |
+
try:
|
13 |
+
nlp = spacy.load("en_core_web_sm")
|
14 |
+
except OSError:
|
15 |
+
print("Downloading spaCy model...")
|
16 |
+
spacy.cli.download("en_core_web_sm")
|
17 |
+
nlp = spacy.load("en_core_web_sm")
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
# Initialize the English text classification pipeline for AI detection
|
22 |
pipeline_en = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-detector-roberta")
|
23 |
|