momo commited on
Commit
137d4d2
β€’
1 Parent(s): 1182cfa
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -44,10 +44,10 @@ def predict(model_name, text):
44
  return_all_scores=True,
45
  function_to_apply='sigmoid'
46
  )
47
-
48
- for result in pipe(text):
49
- print(result)
50
- return result
51
 
52
  if __name__ == '__main__':
53
  exam1 = '경기도 μ„±λ‚¨μ‹œ μˆ˜μ •κ΅¬ νƒœν‰3동은 우리 동넀야!'
@@ -70,8 +70,6 @@ if __name__ == '__main__':
70
  [MODEL_BUF["name"], exam3]
71
  ],
72
  title="ν•œκ΅­μ–΄ ν˜μ˜€ν‘œν˜„, κ°œμΈμ •λ³΄ νŒλ³„κΈ° (Korean Hate Speech and Privacy Detection)",
73
- description="Korean Hate Speech and Privacy Detection.\n \
74
- 15개 label Detection: μ—¬μ„±/κ°€μ‘±, 남성, μ„±μ†Œμˆ˜μž, 인쒅/ꡭ적, μ—°λ Ή, 지역, 쒅ꡐ, 기타 혐였, μ•…ν”Œ/μš•μ„€, clean, name, number, address, bank, person\n \
75
- Current Supported Model:\n1. momo/KcELECTRA-base_Hate_speech_Privacy_Detection\n2. momo/KcBERT-base_Hate_speech_Privacy_Detection."
76
  )
77
  app.launch()
 
44
  return_all_scores=True,
45
  function_to_apply='sigmoid'
46
  )
47
+ output = []
48
+ for result in pipe(text)[0]:
49
+ output.append(result+'\n')
50
+ return output
51
 
52
  if __name__ == '__main__':
53
  exam1 = '경기도 μ„±λ‚¨μ‹œ μˆ˜μ •κ΅¬ νƒœν‰3동은 우리 동넀야!'
 
70
  [MODEL_BUF["name"], exam3]
71
  ],
72
  title="ν•œκ΅­μ–΄ ν˜μ˜€ν‘œν˜„, κ°œμΈμ •λ³΄ νŒλ³„κΈ° (Korean Hate Speech and Privacy Detection)",
73
+ description="Korean Hate Speech and Privacy Detection.\n15개 label Detection:\ μ—¬μ„±/κ°€μ‘±, 남성, μ„±μ†Œμˆ˜μž, 인쒅/ꡭ적, μ—°λ Ή, 지역, 쒅ꡐ, 기타 혐였, μ•…ν”Œ/μš•μ„€, clean, name, number, address, bank, person\nCurrent Supported Model:\n1. momo/KcELECTRA-base_Hate_speech_Privacy_Detection\n2. momo/KcBERT-base_Hate_speech_Privacy_Detection."
 
 
74
  )
75
  app.launch()