Jyiyiyiyi commited on
Commit
51abd68
·
1 Parent(s): c1034a3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -0
README.md CHANGED
@@ -16,7 +16,20 @@ This is a formula transformer model trained on Latex, Presentation MathML and Co
16
  ## Usage
17
 
18
 
 
 
 
 
 
 
19
  ```python
 
 
 
 
 
 
 
20
  embedding_latex = model.encode([{'latex': latex}])
21
  embedding_pmml = model.encode([{'mathml': pmml}])
22
  embedding_cmml = model.encode([{'mathml': cmml}])
 
16
  ## Usage
17
 
18
 
19
+ ```
20
+ pip install -U sentence-transformers
21
+ ```
22
+
23
+ Then you can use the model like this:
24
+
25
  ```python
26
+ from sentence_transformers import SentenceTransformer
27
+ latex = r"13\times x"
28
+ pmml = r"<math><semantics><mrow><mn>13</mn><mo>×</mo><mi>x</mi></mrow></semantics></math>"
29
+ cmml = r"<math><apply><times></times><cn>13</cn><ci>x</ci></apply></math>"
30
+
31
+ model = SentenceTransformer('{MODEL_NAME}')
32
+
33
  embedding_latex = model.encode([{'latex': latex}])
34
  embedding_pmml = model.encode([{'mathml': pmml}])
35
  embedding_cmml = model.encode([{'mathml': cmml}])