JiachenFu commited on
Commit
40b691d
·
1 Parent(s): 6600152

update: fix some bug

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -175,10 +175,10 @@ def greet(mode, language, input_text):
175
  sub_texts = segment_text(split_texts, language=language)
176
  detected = []
177
  if language == "Chinese":
178
- model = DiscrepancyEstimator(load_directory="JiachenFu/Qwen2-0.5B-detectanyllm-detector-zh").to(device)
179
  prob_estimator = zh_prob_estimator
180
  else:
181
- model = DiscrepancyEstimator(load_directory="JiachenFu/Qwen2-0.5B-detectanyllm-detector-en").to(device)
182
  prob_estimator = en_prob_estimator
183
  model.eval()
184
  for i, sub_text in enumerate(sub_texts):
 
175
  sub_texts = segment_text(split_texts, language=language)
176
  detected = []
177
  if language == "Chinese":
178
+ model = DiscrepancyEstimator(pretrained_ckpt="JiachenFu/Qwen2-0.5B-detectanyllm-detector-zh").to(device)
179
  prob_estimator = zh_prob_estimator
180
  else:
181
+ model = DiscrepancyEstimator(pretrained_ckpt="JiachenFu/Qwen2-0.5B-detectanyllm-detector-en").to(device)
182
  prob_estimator = en_prob_estimator
183
  model.eval()
184
  for i, sub_text in enumerate(sub_texts):