hellonlp commited on
Commit
1669bbe
1 Parent(s): 767bda3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -0
README.md CHANGED
@@ -1,3 +1,40 @@
1
  ---
2
  license: mit
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - zh
5
  ---
6
+
7
+
8
+
9
+ | Model | STS-B | ATEC | LCQMC | Avg. |
10
+ |:-----------------------:|:-----:|:-----:|:-----:|:-----:|
11
+ | [hellonlp/promcse-roberta-base-zh(sup)](https://huggingface.co/hellonlp/promcse-roberta-base-zh) | 83.89| -| -| -|
12
+
13
+
14
+
15
+
16
+ To use the tool, first install the `promcse` package from [PyPI](https://pypi.org/project/promcse/)
17
+ ```bash
18
+ pip install promcse
19
+ ```
20
+
21
+ After installing the package, you can load our model by two lines of code
22
+ ```python
23
+ from promcse import PromCSE
24
+ model = PromCSE("hellonlp/promcse-roberta-base-zh", "cls", 10)
25
+
26
+ ```
27
+
28
+ Then you can use our model for **encoding sentences into embeddings**
29
+ ```python
30
+ embeddings = model.encode("武汉是一个美丽的城市。")
31
+ ```
32
+
33
+ **Compute the cosine similarities** between two groups of sentences
34
+ ```python
35
+ sentences_a = ['武汉是一个美丽的城市。']
36
+ sentences_b = ['北京是一个美丽的城市。', '北京是一个美丽的城市。']
37
+ similarities = model.similarity(sentences_a, sentences_b)
38
+ ```
39
+
40
+