randydev commited on
Commit
6a9df4f
·
verified ·
1 Parent(s): 4a5f08c

Update helper_regex.py

Browse files
Files changed (1) hide show
  1. helper_regex.py +1 -12
helper_regex.py CHANGED
@@ -18,7 +18,7 @@ def check_anti_word_by_ryzenth(text: str):
18
  try:
19
  response = requests.get(
20
  f"https://randydev-ryu-js.hf.space/api/v1/ai/akenox/antievalai-v2?query={text}",
21
- headers={"x-api-key": "test"}
22
  ).json()
23
  ok = json.loads(response["results"])
24
 
@@ -30,17 +30,6 @@ def check_anti_word_by_ryzenth(text: str):
30
  except (json.decoder.JSONDecodeError, KeyError, TypeError):
31
  return False, reason
32
 
33
- def check_anti_word_by_ryzenth(text: str):
34
- response = requests.get(
35
- f"https://randydev-ryu-js.hf.space/api/v1/ai/akenox/antievalai-v2?query={text}",
36
- headers={"x-api-key": "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC"}
37
- ).json()
38
- try:
39
- ok = json.loads(response["results"])
40
- return ok["is_detect"]
41
- except json.decoder.JSONDecodeError:
42
- return False
43
-
44
  def contains_stylish_with_whitelist(text: str) -> bool:
45
  emoji_pattern = re.compile(
46
  "[\U0001F600-\U0001F64F"
 
18
  try:
19
  response = requests.get(
20
  f"https://randydev-ryu-js.hf.space/api/v1/ai/akenox/antievalai-v2?query={text}",
21
+ headers={"x-api-key": "akeno_UKQEQMt991kh2Ehh7JqJYKapx8CCyeC"}
22
  ).json()
23
  ok = json.loads(response["results"])
24
 
 
30
  except (json.decoder.JSONDecodeError, KeyError, TypeError):
31
  return False, reason
32
 
 
 
 
 
 
 
 
 
 
 
 
33
  def contains_stylish_with_whitelist(text: str) -> bool:
34
  emoji_pattern = re.compile(
35
  "[\U0001F600-\U0001F64F"