diff --git a/chatgpt_detector_model_predict.py b/chatgpt_detector_model_predict.py
index 1f8038e..0475204 100644
--- a/chatgpt_detector_model_predict.py
+++ b/chatgpt_detector_model_predict.py
@@ -34,7 +34,7 @@ batch_size = 32
# model_name = "drop_aigc_model_2"
# model_name = "drop_aigc_model_3"
# model_name = "/home/majiahui/project/models-llm/aigc_check_10"
-model_name_sentence = "/home/majiahui/project/models-llm/weipu_aigc_512_11"
+model_name_sentence = "/home/majiahui/project/models-llm/weipu_aigc_512_8"
model_name_short = "/home/majiahui/project/models-llm/weipu_aigc_512_5"
pantten_biaoti_0 = '^[1-9一二三四五六七八九ⅠⅡⅢⅣⅤⅥⅦⅧⅨ][、.]\s{0,}?[\u4e00-\u9fa5a-zA-Z]+'
pantten_biaoti_1 = '^第[一二三四五六七八九]章\s{0,}?[\u4e00-\u9fa5a-zA-Z]+'
@@ -109,21 +109,21 @@ def model_preidct(model, text):
output = torch.sigmoid(output[0]).tolist()
print(output)
- if model_name_sentence == "drop_aigc_model_2":
- return_list = {
- "humen": output[0][1],
- "robot": output[0][0]
- }
- elif model_name_sentence == "AIGC_detector_zhv2":
- return_list = {
- "humen": output[0][0],
- "robot": output[0][1]
- }
- else:
- return_list = {
- "humen": output[0][0],
- "robot": output[0][1]
- }
+ # if model_name_sentence == "drop_aigc_model_2":
+ # return_list = {
+ # "humen": output[0][1],
+ # "robot": output[0][0]
+ # }
+ # elif model_name_sentence == "AIGC_detector_zhv2":
+ # return_list = {
+ # "humen": output[0][0],
+ # "robot": output[0][1]
+ # }
+ # else:
+ return_list = {
+ "humen": output[0][0],
+ "robot": output[0][1]
+ }
return return_list
@@ -179,20 +179,20 @@ def main(content_list: list):
reference_bool = is_reference_sentence(sentence)
if reference_bool == False:
- if res["robot"] > 0.9:
+ if res["robot"] > 0.87:
for _ in range(len(sentence)):
gpt_score_list.append(res["robot"])
gpt_score_sentence_list.append(res["robot"])
sim_word += len(sentence)
gpt_content.append(
"".format(str(i)) + sentence + "\n" + "")
- elif 0.9 >= res["robot"] > 0.5:
- for _ in range(len(sentence)):
- gpt_score_list.append(res["robot"])
- gpt_score_sentence_list.append(res["robot"])
- sim_word_5_9 += len(sentence)
- gpt_content.append(
- "".format(str(i)) + sentence + "\n" + "")
+ # elif 0.9 >= res["robot"] > 0.5:
+ # for _ in range(len(sentence)):
+ # gpt_score_list.append(res["robot"])
+ # gpt_score_sentence_list.append(res["robot"])
+ # sim_word_5_9 += len(sentence)
+ # gpt_content.append(
+ # "".format(str(i)) + sentence + "\n" + "")
else:
for _ in range(len(sentence)):
gpt_score_list.append(0)
@@ -287,4 +287,4 @@ def classify(): # 调用模型,设置最大batch_size
if __name__ == '__main__':
t = Thread(target=classify)
- t.start()
+ t.start()
\ No newline at end of file