wendys-llc commited on
Commit
72eacc1
·
1 Parent(s): d68ebfc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -8,8 +8,7 @@ def do_action(text):
8
  candidate_labels = ['gun control', 'abortion', 'gender transition', 'freedom of speech', 'immigration', 'taxes']
9
  result = classifier(text, candidate_labels)
10
 
11
- sentence = f"{result['labels'][0]} with a score of {result['scores'][0]}"
12
- return sentence
13
 
14
- iface = gr.Interface(fn=do_action, inputs="text", outputs="text")
15
  iface.launch()
 
8
  candidate_labels = ['gun control', 'abortion', 'gender transition', 'freedom of speech', 'immigration', 'taxes']
9
  result = classifier(text, candidate_labels)
10
 
11
+ return result
 
12
 
13
+ iface = gr.Interface(fn=do_action, inputs="text", outputs="label")
14
  iface.launch()