Commit
·
2124b87
1
Parent(s):
656c4ee
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +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 |
-
return result
|
| 12 |
|
| 13 |
iface = gr.Interface(fn=do_action, inputs="text", outputs="text")
|
| 14 |
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['categories'][0]
|
| 12 |
|
| 13 |
iface = gr.Interface(fn=do_action, inputs="text", outputs="text")
|
| 14 |
iface.launch()
|