olive100 commited on
Commit
cb4016c
1 Parent(s): 493424f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,6 +10,6 @@ def clf(text):
10
  res = {label:score,'positive' if label.startswith('negative') else 'negative': 1-score}
11
  return res
12
 
13
- demo = gr.Interface(fn=clf, inputs="text", outputs="label")
14
  gr.close_all()
15
  demo.launch()
 
10
  res = {label:score,'positive' if label.startswith('negative') else 'negative': 1-score}
11
  return res
12
 
13
+ demo = gr.Interface(fn=clf, inputs=gr.Textbox(label="输入文本"), outputs=gr.Label(label="输出结果"))
14
  gr.close_all()
15
  demo.launch()