yagnik12 commited on
Commit
d4bae5a
·
verified ·
1 Parent(s): 97cd450

Update ai_text_detector_valid_final.py

Browse files
Files changed (1) hide show
  1. ai_text_detector_valid_final.py +5 -8
ai_text_detector_valid_final.py CHANGED
@@ -40,15 +40,12 @@ label_mapping = {
40
  39: 'text-davinci-002', 40: 'text-davinci-003'
41
  }
42
 
43
- # def clean_text(text: str) -> str:
44
- # """Normalize text for ModernBERT"""
45
- # text = text.replace("\xa0", " ").replace("\u200b", "")
46
- # text = re.sub(r"\s{2,}", " ", text)
47
- # text = re.sub(r"\s+([,.;:?!])", r"\1", text)
48
- # return text.strip()
49
-
50
  def clean_text(text: str) -> str:
51
- return text
 
 
 
 
52
 
53
  def classify_szegedai(text: str):
54
  """
 
40
  39: 'text-davinci-002', 40: 'text-davinci-003'
41
  }
42
 
 
 
 
 
 
 
 
43
  def clean_text(text: str) -> str:
44
+ """Normalize text for ModernBERT"""
45
+ text = text.replace("\xa0", " ").replace("\u200b", "")
46
+ text = re.sub(r"\s{2,}", " ", text)
47
+ text = re.sub(r"\s+([,.;:?!])", r"\1", text)
48
+ return text.strip()
49
 
50
  def classify_szegedai(text: str):
51
  """