Tany Nguyen commited on
Commit
a147390
·
1 Parent(s): 289d337

change to short model

Browse files
README.md CHANGED
@@ -9,7 +9,7 @@ app_port: 7860
9
 
10
  # AI Text Detector API
11
 
12
- This is an API service for detecting AI-generated text. It uses the `yuchuantian/AIGC_detector_env3` model (quantized for CPU efficiency) and FastText for language validation.
13
 
14
  ## Features
15
 
 
9
 
10
  # AI Text Detector API
11
 
12
+ This is an API service for detecting AI-generated text. It uses the `yuchuantian/AIGC_detector_env3short` model (quantized for CPU efficiency) and FastText for language validation.
13
 
14
  ## Features
15
 
download_model.py CHANGED
@@ -4,7 +4,7 @@ import requests
4
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
5
 
6
  # Configuration
7
- MODEL_TAG = "yuchuantian/AIGC_detector_env3"
8
  MODELS_DIR = os.getenv("MODELS_DIR", "saved_models")
9
  QUANTIZED_CPU_FILENAME = "aigc_detector_int8.pt"
10
  FASTTEXT_MODEL_URL = "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.ftz"
 
4
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
5
 
6
  # Configuration
7
+ MODEL_TAG = "yuchuantian/AIGC_detector_env3short"
8
  MODELS_DIR = os.getenv("MODELS_DIR", "saved_models")
9
  QUANTIZED_CPU_FILENAME = "aigc_detector_int8.pt"
10
  FASTTEXT_MODEL_URL = "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.ftz"
src/config.py CHANGED
@@ -18,7 +18,7 @@ class Config:
18
  FASTTEXT_FILENAME = "lid.176.ftz"
19
 
20
  # AI Detector Model
21
- # AI_DETECTOR_MODEL_NAME = "yuchuantian/AIGC_detector_env3" # Deprecated in favor of local quantized
22
  AI_DETECTOR_FILENAME = "aigc_detector_int8.pt"
23
 
24
  @staticmethod
 
18
  FASTTEXT_FILENAME = "lid.176.ftz"
19
 
20
  # AI Detector Model
21
+ # AI_DETECTOR_MODEL_NAME = "yuchuantian/AIGC_detector_env3short" # Deprecated in favor of local quantized
22
  AI_DETECTOR_FILENAME = "aigc_detector_int8.pt"
23
 
24
  @staticmethod
src/models/ai_detector_model.py CHANGED
@@ -37,7 +37,7 @@ class AIDetectorModel:
37
  logger.warning(f"Failed to load quantized model: {e}. Attempting fallback...")
38
 
39
  # 2. Fallback to base Hugging Face model
40
- fallback_tag = "yuchuantian/AIGC_detector_env3"
41
  logger.info(f"Loading fallback model: {fallback_tag}...")
42
 
43
  try:
 
37
  logger.warning(f"Failed to load quantized model: {e}. Attempting fallback...")
38
 
39
  # 2. Fallback to base Hugging Face model
40
+ fallback_tag = "yuchuantian/AIGC_detector_env3short"
41
  logger.info(f"Loading fallback model: {fallback_tag}...")
42
 
43
  try: