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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -8,6 +8,8 @@ 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
  return result
12
 
13
  iface = gr.Interface(fn=do_action, inputs="text", outputs="label")
 
8
  candidate_labels = ['gun control', 'abortion', 'gender transition', 'freedom of speech', 'immigration', 'taxes']
9
  result = classifier(text, candidate_labels)
10
 
11
+ result = dict(zip(result['labels'], result['scores']))
12
+
13
  return result
14
 
15
  iface = gr.Interface(fn=do_action, inputs="text", outputs="label")