Lord-Raven commited on
Commit
79a1b2c
·
1 Parent(s): ef3a388

Experimenting with few-shot classification.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -110,7 +110,7 @@ def zero_shot_classification(data):
110
  return response_string
111
 
112
  def create_sequences(data):
113
- return ['###Given:\n' + data['sequence'] + '\n###End Given\n###Hypothesis:\n' + data['hypothesis_template'].format(label) for label in data['candidate_labels'] + "\n###End Hypothesis" + "\nBased on the Given passage, the Hypothesis is {}"]
114
 
115
  def few_shot_classification(data):
116
  sequences = create_sequences(data)
 
110
  return response_string
111
 
112
  def create_sequences(data):
113
+ return ['###Given:\n' + data['sequence'] + '\n###End Given\n###Hypothesis:\n' + data['hypothesis_template'].format(label) + "\n###End Hypothesis" + "\nBased on the Given passage, the Hypothesis is {}" for label in data['candidate_labels']]
114
 
115
  def few_shot_classification(data):
116
  sequences = create_sequences(data)