Kaushik Bar commited on
Commit
352312d
·
1 Parent(s): 7bbe89d

first commit

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -59,7 +59,7 @@ def prep_examples():
59
  [example_text1, example_labels1, ""],
60
  [example_text2, example_labels2, ""],
61
  [example_text3, example_labels3, ""],
62
- [example_text4, example_labels4, "The sentiment expressed here is {}."],
63
  [example_text5, example_labels5, ""],
64
  [example_text6, example_labels6, ""],
65
  [example_text7, example_labels7, ""],
@@ -92,7 +92,7 @@ def sequence_to_classify(text, labels, hypothesis_template):
92
  else:
93
  model = model_multi
94
 
95
- if hypothesis_template == None:
96
  hypothesis_template = "{}"
97
  print("I'm here")
98
  labels = [hypothesis_template.format(label) for label in labels.split(";;")]
 
59
  [example_text1, example_labels1, ""],
60
  [example_text2, example_labels2, ""],
61
  [example_text3, example_labels3, ""],
62
+ [example_text4, example_labels4, "The sentiment expressed here is {}"],
63
  [example_text5, example_labels5, ""],
64
  [example_text6, example_labels6, ""],
65
  [example_text7, example_labels7, ""],
 
92
  else:
93
  model = model_multi
94
 
95
+ if hypothesis_template == "":
96
  hypothesis_template = "{}"
97
  print("I'm here")
98
  labels = [hypothesis_template.format(label) for label in labels.split(";;")]