Spaces:
Sleeping
Sleeping
add app
Browse files
app.py
CHANGED
@@ -74,7 +74,7 @@ def predict(model_name, text):
|
|
74 |
function_to_apply='sigmoid'
|
75 |
)
|
76 |
|
77 |
-
return
|
78 |
|
79 |
if __name__ == '__main__':
|
80 |
text = '์ฟ๋ด๊ฑธ ํ๋ณฟ๊ธ ์ฟ๋๊ณญ ์์ ฉ๋๊ณ ์์์๋ฉ'
|
@@ -87,7 +87,7 @@ if __name__ == '__main__':
|
|
87 |
#Create a gradio app with a button that calls predict()
|
88 |
app = gr.Interface(
|
89 |
fn=predict,
|
90 |
-
inputs=[gr.inputs.Dropdown(model_name_list, label="Model Name"), 'text'], outputs=['
|
91 |
examples = [[MODEL_BUF["name"], text], [MODEL_BUF["name"], "4=๐ฆ 4โ ๐ฆ"]],
|
92 |
title="ํ๊ตญ์ด ํ์คํํ, ๊ฐ์ธ์ ๋ณด ํ๋ณ๊ธฐ (Korean Hate Speech and Privacy Detection)",
|
93 |
description="Korean Hate Speech and Privacy Detection."
|
|
|
74 |
function_to_apply='sigmoid'
|
75 |
)
|
76 |
|
77 |
+
return pipe(text)[0]
|
78 |
|
79 |
if __name__ == '__main__':
|
80 |
text = '์ฟ๋ด๊ฑธ ํ๋ณฟ๊ธ ์ฟ๋๊ณญ ์์ ฉ๋๊ณ ์์์๋ฉ'
|
|
|
87 |
#Create a gradio app with a button that calls predict()
|
88 |
app = gr.Interface(
|
89 |
fn=predict,
|
90 |
+
inputs=[gr.inputs.Dropdown(model_name_list, label="Model Name"), 'text'], outputs=['text'],
|
91 |
examples = [[MODEL_BUF["name"], text], [MODEL_BUF["name"], "4=๐ฆ 4โ ๐ฆ"]],
|
92 |
title="ํ๊ตญ์ด ํ์คํํ, ๊ฐ์ธ์ ๋ณด ํ๋ณ๊ธฐ (Korean Hate Speech and Privacy Detection)",
|
93 |
description="Korean Hate Speech and Privacy Detection."
|