momo commited on
Commit
18e6afb
ยท
1 Parent(s): 690c54c
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -74,7 +74,7 @@ def predict(model_name, text):
74
  function_to_apply='sigmoid'
75
  )
76
 
77
- return [pipe(text)[0]]
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=['label'],
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."