Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
d2e06fa
1
Parent(s):
5a3b82a
Experimenting with few-shot classification.
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def zero_shot_classification(data):
|
|
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" for label in data['candidate_labels']]
|
114 |
-
return [data['sequence'] + '\n' + data['hypothesis_template'].format(label)
|
115 |
|
116 |
def few_shot_classification(data):
|
117 |
sequences = create_sequences(data)
|
|
|
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" for label in data['candidate_labels']]
|
114 |
+
return [data['sequence'] + '\n' + data['hypothesis_template'].format(label) for label in data['candidate_labels']]
|
115 |
|
116 |
def few_shot_classification(data):
|
117 |
sequences = create_sequences(data)
|