Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
ab85ef4
1
Parent(s):
8e9d450
Experimenting with few-shot classification.
Browse files
app.py
CHANGED
@@ -56,8 +56,8 @@ tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, model_max_length=512)
|
|
56 |
classifier = pipeline(task="zero-shot-classification", model=model, tokenizer=tokenizer)
|
57 |
|
58 |
few_shot_tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-small-en-v1.5', model_max_length=512)
|
59 |
-
ort_model = ORTModelForFeatureExtraction.from_pretrained('BAAI/bge-small-en-v1.5', file_name="onnx/model.onnx"
|
60 |
-
few_shot_model = SetFitModel.from_pretrained("moshew/bge-small-en-v1.5_setfit-sst2-english"
|
61 |
|
62 |
# Train few_shot_model
|
63 |
candidate_labels = ["supported", "refuted", "neither"]
|
|
|
56 |
classifier = pipeline(task="zero-shot-classification", model=model, tokenizer=tokenizer)
|
57 |
|
58 |
few_shot_tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-small-en-v1.5', model_max_length=512)
|
59 |
+
ort_model = ORTModelForFeatureExtraction.from_pretrained('BAAI/bge-small-en-v1.5', file_name="onnx/model.onnx")
|
60 |
+
few_shot_model = SetFitModel.from_pretrained("moshew/bge-small-en-v1.5_setfit-sst2-english")
|
61 |
|
62 |
# Train few_shot_model
|
63 |
candidate_labels = ["supported", "refuted", "neither"]
|