hjp157688 commited on
Commit
2064da5
1 Parent(s): 95ee9f3

Update pages/文件式文本检测工具.py

Browse files
pages/文件式文本检测工具.py CHANGED
@@ -120,7 +120,7 @@ def load_models_and_predict(text, device):
120
 
121
  # 分析结果
122
  if out3 == "1":
123
- if out1 == out2 == out3 == 1:
124
  result = "这句话具有攻击性和社会偏见"
125
  elif out1 == 0 and out2 == 1:
126
  result = "这句话具有攻击性,但无社会偏见"
@@ -129,7 +129,7 @@ def load_models_and_predict(text, device):
129
  else:
130
  result = "这句话具有攻击性"
131
  elif out3 == "0":
132
- if out1 == out2 == out3 == 0:
133
  result = "这句话不具有攻击性和社会偏见"
134
  elif out1 == 0 and out2 == 1:
135
  result = "这句话具有攻击性,但无社会偏见"
 
120
 
121
  # 分析结果
122
  if out3 == "1":
123
+ if out1 == out2 == 1:
124
  result = "这句话具有攻击性和社会偏见"
125
  elif out1 == 0 and out2 == 1:
126
  result = "这句话具有攻击性,但无社会偏见"
 
129
  else:
130
  result = "这句话具有攻击性"
131
  elif out3 == "0":
132
+ if out1 == out2 == 0:
133
  result = "这句话不具有攻击性和社会偏见"
134
  elif out1 == 0 and out2 == 1:
135
  result = "这句话具有攻击性,但无社会偏见"