lv12 commited on
Commit
a2edfb0
1 Parent(s): bd223d1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -16
README.md CHANGED
@@ -34,16 +34,16 @@ queries = [
34
  "girls sandals",
35
  "backpacks",
36
  "shoes",
37
- "mustard blouse"
38
  ]
39
  documents = [
40
- "Nike Air Max, with air cushion",
41
- "Adidas Ultraboost, the best boost you can get",
42
- "Women's sandals wide width 9",
43
- "Girl's surf backpack",
44
- "Fresh watermelon, all you can eat",
45
- "Floral yellow dress with frills and lace"
46
- ]
47
 
48
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
49
  tokenizer = AutoTokenizer.from_pretrained(model_name)
@@ -74,21 +74,25 @@ queries = [
74
  "girls sandals",
75
  "backpacks",
76
  "shoes",
77
- "mustard blouse"
78
  ]
79
  documents = [
80
- "Nike Air Max, with air cushion",
81
- "Adidas Ultraboost, the best boost you can get",
82
- "Women's sandals wide width 9",
83
- "Girl's surf backpack",
84
- "Fresh watermelon, all you can eat",
85
- "Floral yellow dress with frills and lace"
86
- ]
87
  model = CrossEncoder(model_name, max_length=512)
88
  scores = model.predict([(q, d) for q, d in zip(queries, documents)])
89
  print(scores)
90
  ```
91
 
 
 
 
 
92
  ## Training
93
 
94
  Trained using `CrossEntropyLoss` using `<query, document>` pairs with `grade` as the label.
 
34
  "girls sandals",
35
  "backpacks",
36
  "shoes",
37
+ "mustard sleeveless gown"
38
  ]
39
  documents = [
40
+ '{"title": "Nike Air Max, with air cushion", "description": "The best shoes you can get", "brand": "Nike", "color": "black"}',
41
+ '{"title": "Adidas Ultraboost, the best boost you can get", "description": "The shoes that represent the world", "brand": "Adidas", "color": "white"}',
42
+ '{"title": "Womens sandals", "description": "Sandals: wide width 9", "brand": "Chacos", "color": "blue"}',
43
+ '{"title": "Girls surf backpack", "description": "The best backpack in town", "brand": "Roxy", "color": "pink"}',
44
+ '{"title": "Fresh watermelon", "description": "The best fruit in town, all you can eat", "brand": "Fruitsellers Inc.", "color": "green"}',
45
+ '{"title": "Floral yellow dress with frills and lace", "description": "Brighten up your summers with a gorgeous dress", "brand": "Dressmakers Inc.", "color": "bright yellow"}'
46
+ ]
47
 
48
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
49
  tokenizer = AutoTokenizer.from_pretrained(model_name)
 
74
  "girls sandals",
75
  "backpacks",
76
  "shoes",
77
+ "mustard sleeveless gown"
78
  ]
79
  documents = [
80
+ '{"title": "Nike Air Max, with air cushion", "description": "The best shoes you can get", "brand": "Nike", "color": "black"}',
81
+ '{"title": "Adidas Ultraboost, the best boost you can get", "description": "The shoes that represent the world", "brand": "Adidas", "color": "white"}',
82
+ '{"title": "Womens sandals", "description": "Sandals: wide width 9", "brand": "Chacos", "color": "blue"}',
83
+ '{"title": "Girls surf backpack", "description": "The best backpack in town", "brand": "Roxy", "color": "pink"}',
84
+ '{"title": "Fresh watermelon", "description": "The best fruit in town, all you can eat", "brand": "Fruitsellers Inc.", "color": "green"}',
85
+ '{"title": "Floral yellow dress with frills and lace", "description": "Brighten up your summers with a gorgeous dress", "brand": "Dressmakers Inc.", "color": "bright yellow"}'
86
+ ]
87
  model = CrossEncoder(model_name, max_length=512)
88
  scores = model.predict([(q, d) for q, d in zip(queries, documents)])
89
  print(scores)
90
  ```
91
 
92
+ ```md
93
+ [ 1.1324936 0.51267356 1.039221 1.5969192 -0.8867093 0.5035825 ]
94
+ ```
95
+
96
  ## Training
97
 
98
  Trained using `CrossEntropyLoss` using `<query, document>` pairs with `grade` as the label.