Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,10 +5,10 @@ zero_shot_classifier = pipeline("zero-shot-classification")
|
|
5 |
|
6 |
def classify(text,labels):
|
7 |
classifer_labels = labels.split(",")
|
8 |
-
#["
|
9 |
response = zero_shot_classifier(text,classifer_labels)
|
10 |
return response
|
11 |
-
txt=grad.Textbox(lines=1, label="English", placeholder="
|
12 |
labels=grad.Textbox(lines=1, label="Labels", placeholder="comma separated labels")
|
13 |
-
out=grad.Textbox(lines=1, label="
|
14 |
grad.Interface(classify, inputs=[txt,labels], outputs=out).launch()
|
|
|
5 |
|
6 |
def classify(text,labels):
|
7 |
classifer_labels = labels.split(",")
|
8 |
+
#["software", "politics", "love", "movies", "emergency", "advertisment","sports"]
|
9 |
response = zero_shot_classifier(text,classifer_labels)
|
10 |
return response
|
11 |
+
txt=grad.Textbox(lines=1, label="English", placeholder="text to be classified")
|
12 |
labels=grad.Textbox(lines=1, label="Labels", placeholder="comma separated labels")
|
13 |
+
out=grad.Textbox(lines=1, label="Classification")
|
14 |
grad.Interface(classify, inputs=[txt,labels], outputs=out).launch()
|