Update README.md
Browse files
README.md
CHANGED
@@ -1,2 +1,14 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#Data
|
2 |
+
unsupervise train data is E-commerce dialogue.
|
3 |
+
|
4 |
+
##Model
|
5 |
+
model is [simcse](https://arxiv.org/abs/2104.08821).
|
6 |
+
|
7 |
+
##Usage
|
8 |
+
```python
|
9 |
+
>>>from transformers import AutoTokenizer, AutoModel
|
10 |
+
>>>model = AutoModel.from_pretrained("tuhailong/simcse_model")
|
11 |
+
>>>tokenizer = AutoTokenizer.from_pretrained("tuhailong/simcse_model")
|
12 |
+
>>>sentences_str_list = ["今天天气不错的","天气不错的"]
|
13 |
+
>>>inputs = tokenizer(sentences_str_list,return_tensors="pt", padding='max_length', truncation=True, max_length=32)
|
14 |
+
>>>outputs = model(**inputs)
|