Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from transformers import pipeline
|
3 |
-
|
4 |
-
classifier = pipeline("zero-shot-classification",
|
5 |
-
model="facebook/bart-large-mnli")
|
6 |
-
|
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|