Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
33afb89
1
Parent(s):
55d9b22
Experimenting with few-shot classification.
Browse files
app.py
CHANGED
@@ -67,9 +67,9 @@ model = ORTModelForSequenceClassification.from_pretrained(model_name, file_name=
|
|
67 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, model_max_length=512)
|
68 |
classifier = pipeline(task="zero-shot-classification", model=model, tokenizer=tokenizer)
|
69 |
|
70 |
-
few_shot_tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-
|
71 |
-
ort_model = ORTModelForFeatureExtraction.from_pretrained('BAAI/bge-
|
72 |
-
few_shot_model = SetFitModel.from_pretrained("
|
73 |
|
74 |
# Train few_shot_model
|
75 |
candidate_labels = ["correct", "wrong"]
|
|
|
67 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, model_max_length=512)
|
68 |
classifier = pipeline(task="zero-shot-classification", model=model, tokenizer=tokenizer)
|
69 |
|
70 |
+
few_shot_tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-small-en-v1.5', model_max_length=512) # 'BAAI/bge-small-en-v1.5'
|
71 |
+
ort_model = ORTModelForFeatureExtraction.from_pretrained('BAAI/bge-small-en-v1.5', file_name="onnx/model.onnx") # 'BAAI/bge-small-en-v1.5'
|
72 |
+
few_shot_model = SetFitModel.from_pretrained("moshew/bge-small-en-v1.5_setfit-sst2-english") # "moshew/bge-small-en-v1.5_setfit-sst2-english"
|
73 |
|
74 |
# Train few_shot_model
|
75 |
candidate_labels = ["correct", "wrong"]
|