add app
Browse files
app.py
CHANGED
@@ -45,11 +45,9 @@ def predict(model_name, text):
|
|
45 |
function_to_apply='sigmoid'
|
46 |
)
|
47 |
|
48 |
-
output = []
|
49 |
for result in pipe(text):
|
50 |
-
|
51 |
-
|
52 |
-
return output
|
53 |
|
54 |
if __name__ == '__main__':
|
55 |
exam1 = 'κ²½κΈ°λ μ±λ¨μ μμ ꡬ νν3λμ μ°λ¦¬ λλ€μΌ!'
|
@@ -72,8 +70,8 @@ if __name__ == '__main__':
|
|
72 |
[MODEL_BUF["name"], exam3]
|
73 |
],
|
74 |
title="νκ΅μ΄ νμ€νν, κ°μΈμ 보 νλ³κΈ° (Korean Hate Speech and Privacy Detection)",
|
75 |
-
description="Korean Hate Speech and Privacy Detection
|
76 |
-
15κ° label Detection: μ¬μ±/κ°μ‘±, λ¨μ±, μ±μμμ, μΈμ’
/κ΅μ , μ°λ Ή, μ§μ, μ’
κ΅, κΈ°ν νμ€, μ
ν/μμ€, clean, name, number, address, bank, person
|
77 |
Current Supported Model:\n1. momo/KcELECTRA-base_Hate_speech_Privacy_Detection\n2. momo/KcBERT-base_Hate_speech_Privacy_Detection."
|
78 |
)
|
79 |
app.launch()
|
|
|
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 |
[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()
|