Spaces:
Running
Running
- helper_regex.py +10 -0
helper_regex.py
CHANGED
@@ -8,9 +8,19 @@
|
|
8 |
# credits xtdevs
|
9 |
|
10 |
import re
|
|
|
|
|
11 |
|
12 |
WHITELIST_WORDS = {"eval", "admin", "bot", "python", "ok", "done", "anti"}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
def contains_stylish_with_whitelist(text: str) -> bool:
|
15 |
emoji_pattern = re.compile(
|
16 |
"[\U0001F600-\U0001F64F"
|
|
|
8 |
# credits xtdevs
|
9 |
|
10 |
import re
|
11 |
+
import requests
|
12 |
+
import json
|
13 |
|
14 |
WHITELIST_WORDS = {"eval", "admin", "bot", "python", "ok", "done", "anti"}
|
15 |
|
16 |
+
def check_anti_word_by_ryzenth(text: str):
|
17 |
+
response = requests.get(
|
18 |
+
f"https://randydev-ryu-js.hf.space/api/v1/ai/akenox/antidevai?query={text}",
|
19 |
+
headers={"x-api-key": "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC"}
|
20 |
+
).json()
|
21 |
+
ok = json.loads(response["results"])
|
22 |
+
return ok["is_detect"]
|
23 |
+
|
24 |
def contains_stylish_with_whitelist(text: str) -> bool:
|
25 |
emoji_pattern = re.compile(
|
26 |
"[\U0001F600-\U0001F64F"
|