Spaces:
Running
Running
aliasgerovs
commited on
Commit
•
147e661
1
Parent(s):
d9946cc
Updated
Browse files
README.md
CHANGED
@@ -8,6 +8,9 @@ sdk_version: 4.17.0
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
+
models:
|
12 |
+
- polygraf-ai/ai-text-mc-v5-lighter-spec
|
13 |
+
- polygraf-ai/ai-text-bc-bert-1-4m
|
14 |
---
|
15 |
|
16 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
CHANGED
@@ -15,7 +15,6 @@ from datetime import date
|
|
15 |
import nltk
|
16 |
import os
|
17 |
|
18 |
-
use_auth_token = os.environ["MC_BC_TOKEN"]
|
19 |
np.set_printoptions(suppress=True)
|
20 |
|
21 |
|
@@ -158,15 +157,15 @@ AI DETECTION SECTION
|
|
158 |
"""
|
159 |
|
160 |
text_bc_model_path = "polygraf-ai/ai-text-bc-bert-1-4m"
|
161 |
-
text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path
|
162 |
text_bc_model = AutoModelForSequenceClassification.from_pretrained(
|
163 |
-
text_bc_model_path
|
164 |
)
|
165 |
|
166 |
text_mc_model_path = "polygraf-ai/ai-text-mc-v5-lighter-spec"
|
167 |
-
text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path
|
168 |
text_mc_model = AutoModelForSequenceClassification.from_pretrained(
|
169 |
-
text_mc_model_path
|
170 |
)
|
171 |
|
172 |
def remove_special_characters(text):
|
|
|
15 |
import nltk
|
16 |
import os
|
17 |
|
|
|
18 |
np.set_printoptions(suppress=True)
|
19 |
|
20 |
|
|
|
157 |
"""
|
158 |
|
159 |
text_bc_model_path = "polygraf-ai/ai-text-bc-bert-1-4m"
|
160 |
+
text_bc_tokenizer = AutoTokenizer.from_pretrained(text_bc_model_path)
|
161 |
text_bc_model = AutoModelForSequenceClassification.from_pretrained(
|
162 |
+
text_bc_model_path
|
163 |
)
|
164 |
|
165 |
text_mc_model_path = "polygraf-ai/ai-text-mc-v5-lighter-spec"
|
166 |
+
text_mc_tokenizer = AutoTokenizer.from_pretrained(text_mc_model_path)
|
167 |
text_mc_model = AutoModelForSequenceClassification.from_pretrained(
|
168 |
+
text_mc_model_path
|
169 |
)
|
170 |
|
171 |
def remove_special_characters(text):
|