Lord-Raven commited on
Commit
33afb89
·
1 Parent(s): 55d9b22

Experimenting with few-shot classification.

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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-m3', model_max_length=512) # 'BAAI/bge-small-en-v1.5'
71
- ort_model = ORTModelForFeatureExtraction.from_pretrained('BAAI/bge-m3', file_name="onnx/model.onnx") # 'BAAI/bge-small-en-v1.5'
72
- few_shot_model = SetFitModel.from_pretrained("BAAI/bge-m3") # "moshew/bge-small-en-v1.5_setfit-sst2-english"
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"]