Skip to content

Commit

Permalink
fixed e5 modelhub card code sections
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedlone127 committed Aug 31, 2023
1 parent 438d9e6 commit 0bdef00
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions docs/_posts/ahmedlone127/2023-08-25-e5_base_opt_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_base","en") \
embeddings =E5Embeddings.pretrained("e5_base_opt","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_base","en")
val embeddings = E5Embeddings.pretrained("e5_base_opt","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/ahmedlone127/2023-08-25-e5_base_quantized_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_base","en") \
embeddings =E5Embeddings.pretrained("e5_base_quantized","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_base","en")
val embeddings = E5Embeddings.pretrained("e5_base_quantized","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/ahmedlone127/2023-08-25-e5_base_v2_opt_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_base_v2","en") \
embeddings =E5Embeddings.pretrained("e5_base_v2_opt","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_base_v2","en")
val embeddings = E5Embeddings.pretrained("e5_base_v2_opt","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_base_v2","en") \
embeddings =E5Embeddings.pretrained("e5_base_v2_quantized","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_base_v2","en")
val embeddings = E5Embeddings.pretrained("e5_base_v2_quantized","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")

Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/ahmedlone127/2023-08-25-e5_large_v2_opt_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_large_v2","en") \
embeddings =E5Embeddings.pretrained("e5_large_v2_opt","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_large_v2","en")
val embeddings = E5Embeddings.pretrained("e5_large_v2_opt","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_large_v2","en") \
embeddings =E5Embeddings.pretrained("e5_large_v2_quantized","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_large_v2","en")
val embeddings = E5Embeddings.pretrained("e5_large_v2_quantized","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/ahmedlone127/2023-08-25-e5_small_opt_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_small","en") \
embeddings =E5Embeddings.pretrained("e5_small_opt","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_small","en")
val embeddings = E5Embeddings.pretrained("e5_small_opt","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/ahmedlone127/2023-08-25-e5_small_quantized_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_small","en") \
embeddings =E5Embeddings.pretrained("e5_small_quantized","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_small","en")
val embeddings = E5Embeddings.pretrained("e5_small_quantized","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/ahmedlone127/2023-08-25-e5_small_v2_opt_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_small_v2","en") \
embeddings =E5Embeddings.pretrained("e5_small_v2_opt","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_small_v2","en")
val embeddings = E5Embeddings.pretrained("e5_small_v2_opt","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Text Embeddings by Weakly-Supervised Contrastive Pre-training. Liang Wang, Nan Y
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
embeddings =E5Embeddings.pretrained("e5_small_v2","en") \
embeddings =E5Embeddings.pretrained("e5_small_v2_quantized","en") \
.setInputCols(["documents"]) \
.setOutputCol("instructor")

pipeline = Pipeline().setStages([document_assembler, embeddings])
```
```scala
val embeddings = E5Embeddings.pretrained("e5_small_v2","en")
val embeddings = E5Embeddings.pretrained("e5_small_v2_quantized","en")
.setInputCols(["document"])
.setOutputCol("e5_embeddings")
val pipeline = new Pipeline().setStages(Array(document, embeddings))
Expand Down

0 comments on commit 0bdef00

Please sign in to comment.