Olfat commited on
Commit
6fcff4a
1 Parent(s): 62b8385

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- #["time", "procreation", "love", "beauty"]
9
  response = zero_shot_classifier(text,classifer_labels)
10
  return response
11
- txt=grad.Textbox(lines=1, label="English", placeholder="Shakespearean Sonnet")
12
  labels=grad.Textbox(lines=1, label="Labels", placeholder="comma separated labels")
13
- out=grad.Textbox(lines=1, label="Theme")
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()