Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
cea7120
1
Parent(s):
f8672fc
Experimenting with few-shot classification.
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, model_max_length=512)
|
|
53 |
classifier = pipeline(task="zero-shot-classification", model=model, tokenizer=tokenizer)
|
54 |
|
55 |
few_shot_tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-small-en-v1.5', model_max_length=512)
|
56 |
-
ort_model = ORTModelForFeatureExtraction.from_pretrained('BAAI/bge-small-en-v1.5')
|
57 |
few_shot_model = SetFitModel.from_pretrained("moshew/bge-small-en-v1.5_setfit-sst2-english")
|
58 |
onnx_few_shot_model = OnnxSetFitModel(ort_model, few_shot_tokenizer, few_shot_model.model_head)
|
59 |
|
|
|
53 |
classifier = pipeline(task="zero-shot-classification", model=model, tokenizer=tokenizer)
|
54 |
|
55 |
few_shot_tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-small-en-v1.5', model_max_length=512)
|
56 |
+
ort_model = ORTModelForFeatureExtraction.from_pretrained('BAAI/bge-small-en-v1.5', file_name="onnx/model.onnx")
|
57 |
few_shot_model = SetFitModel.from_pretrained("moshew/bge-small-en-v1.5_setfit-sst2-english")
|
58 |
onnx_few_shot_model = OnnxSetFitModel(ort_model, few_shot_tokenizer, few_shot_model.model_head)
|
59 |
|