Update README.md
Browse files
README.md
CHANGED
@@ -1,14 +1,22 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
unsupervise train data is E-commerce dialogue.
|
3 |
|
4 |
-
##Model
|
5 |
model is [simcse](https://arxiv.org/abs/2104.08821).
|
6 |
|
7 |
-
|
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)
|
|
|
1 |
+
---
|
2 |
+
language: zh
|
3 |
+
tags:
|
4 |
+
- simcse
|
5 |
+
datasets:
|
6 |
+
- dialogue
|
7 |
+
---
|
8 |
+
|
9 |
+
# Data
|
10 |
unsupervise train data is E-commerce dialogue.
|
11 |
|
12 |
+
## Model
|
13 |
model is [simcse](https://arxiv.org/abs/2104.08821).
|
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)
|