tuhailong commited on
Commit
333269f
1 Parent(s): 7115fda

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -6
README.md CHANGED
@@ -14,10 +14,8 @@ model created by [sentence-tansformers](https://www.sbert.net/index.html),mode
14
 
15
  ### Usage
16
  ```python
17
- >>> from transformers import AutoTokenizer, AutoModel
18
- >>> model = AutoModel.from_pretrained("tuhailong/simcse_model")
19
- >>> tokenizer = AutoTokenizer.from_pretrained("tuhailong/simcse_model")
20
- >>> sentences_str_list = ["今天天气不错的","天气不错的"]
21
- >>> inputs = tokenizer(sentences_str_list,return_tensors="pt", padding='max_length', truncation=True, max_length=32)
22
- >>> outputs = model(**inputs)
23
  ```
 
14
 
15
  ### Usage
16
  ```python
17
+ >>> from sentence_transformers.cross_encoder import CrossEncoder
18
+ >>> model = CrossEncoder('tuhailong/cross-encoder')
19
+ >>> scores = model.predict([["今天天气不错", "今天心情不错"]])
20
+ >>> print(scores)
 
 
21
  ```