Skip to content

Models hub #13940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
57d855e
Merge branch 'master' into models_hub
maziyarpanahi Nov 21, 2022
41cda2d
Merge branch 'models_hub' of https://github.com/JohnSnowLabs/spark-nl…
maziyarpanahi Nov 25, 2022
6c39602
Merge branch 'master' into models_hub
maziyarpanahi Dec 15, 2022
bed4adb
Merge branch 'master' into models_hub
maziyarpanahi Dec 21, 2022
cf0b08f
Merge branch 'master' into models_hub
maziyarpanahi Feb 7, 2023
93d6753
Merge branch 'master' into models_hub
maziyarpanahi Mar 14, 2023
afb700e
Add model 2023-04-13-CyberbullyingDetection_ClassifierDL_tfhub_en (#1…
jsl-models Apr 13, 2023
bb9a155
2023-04-20-distilbert_base_uncased_mnli_en (#13761)
jsl-models Apr 20, 2023
ea0ba05
2023-04-20-distilbert_base_zero_shot_classifier_turkish_cased_multinl…
jsl-models Apr 21, 2023
9afffb1
2023-05-04-roberta_base_zero_shot_classifier_nli_en (#13781)
jsl-models May 4, 2023
f4356e5
2023-05-09-distilbart_xsum_6_6_en (#13788)
jsl-models May 10, 2023
04149fb
Merge branch 'master' into models_hub
maziyarpanahi May 10, 2023
de3e19e
2023-05-11-distilbart_cnn_12_6_en (#13795)
jsl-models May 11, 2023
71de0f7
2023-05-19-match_pattern_en (#13805)
jsl-models May 21, 2023
f28ea8e
2023-05-22-explain_document_md_fr (#13811)
jsl-models May 23, 2023
4049881
2023-05-24-explain_document_md_fr (#13821)
jsl-models May 25, 2023
e4e465e
Add model 2023-05-25-explain_document_md_fr (#13827)
jsl-models May 25, 2023
e8e01a5
2023-05-25-dependency_parse_en (#13828)
jsl-models May 26, 2023
9c0a24e
Merge branch 'master' into models_hub
maziyarpanahi May 26, 2023
2fd64c3
2023-05-25-distilcamembert_french_legal_fr (#13826)
jsl-models May 26, 2023
795ebf8
Update title for 2023-05-25-distilcamembert_french_legal_fr.md (#13831)
Mary-Sci May 26, 2023
c04ca51
2023-05-27-explain_document_md_fr (#13836)
jsl-models May 27, 2023
4d64d1b
2023-05-28-longformer_base_english_legal_en (#13838)
jsl-models May 28, 2023
02a9afb
2023-05-28-xlm_longformer_base_english_legal_en (#13839)
jsl-models May 29, 2023
d054074
2023-06-21-bert_embeddings_distil_clinical_en (#13861)
jsl-models Jun 21, 2023
43ab794
2023-06-26-distilbert_embeddings_finetuned_sarcasm_classification_en …
jsl-models Jun 26, 2023
7cde44f
2023-06-27-roberta_embeddings_robertinh_gl (#13868)
jsl-models Jun 27, 2023
ced98b6
Add model 2023-06-29-xlmroberta_embeddings_paraphrase_mpnet_base_v2_x…
jsl-models Jun 30, 2023
dfaabd4
2023-06-08-instructor_base_en (#13850)
jsl-models Jul 1, 2023
59113cd
2023-06-28-roberta_base_en (#13871)
jsl-models Jul 1, 2023
740f4fb
Merge branch 'master' into models_hub
maziyarpanahi Jul 3, 2023
c999bd6
Merge branch 'master' into models_hub
maziyarpanahi Jul 4, 2023
27840ed
Add model 2023-07-05-image_classifier_convnext_tiny_224_local_en (#13…
jsl-models Jul 5, 2023
566b6ee
Add model 2023-07-06-quora_distilbert_multilingual_en (#13882)
jsl-models Jul 18, 2023
d246455
removed duplicated sections (#13885)
ahmedlone127 Jul 18, 2023
182bc05
Add model 2023-07-20-xlm_roberta_large_zero_shot_classifier_xnli_anli…
jsl-models Jul 21, 2023
9a1bea5
Add model 2023-07-28-twitter_xlm_roberta_base_sentiment_en (#13905)
jsl-models Jul 28, 2023
cc00383
2023-07-30-albert_embeddings_ALR_BERT_ro (#13910)
jsl-models Aug 2, 2023
b6d3cf1
2023-07-28-twitter_xlm_roberta_base_sentiment_en (#13906)
jsl-models Aug 2, 2023
0504fb7
2023-08-07-bart_large_zero_shot_classifier_mnli_en (#13917)
jsl-models Aug 7, 2023
1a0f376
2023-08-15-gte_base_en (#13922)
jsl-models Aug 15, 2023
0e2bb83
2023-08-15-bge_small_en (#13923)
jsl-models Aug 15, 2023
a11908a
2023-08-18-mpnet_embedding_mpnet_snli_en (#13929)
jsl-models Aug 24, 2023
06f07da
2023-08-22-asr_whisper_tiny_opt_xx (#13931)
jsl-models Aug 24, 2023
b1b99f5
2023-08-25-e5_small_en (#13939)
jsl-models Aug 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
109 changes: 109 additions & 0 deletions docs/_posts/DevinTDHa/2023-08-22-asr_whisper_tiny_opt_xx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
layout: model
title: Official whisper-tiny Optimized
author: John Snow Labs
name: asr_whisper_tiny_opt
date: 2023-08-22
tags: [whisper, en, audio, open_source, asr, onnx, xx]
task: Automatic Speech Recognition
language: xx
edition: Spark NLP 5.1.0
spark_version: 3.0
supported: true
engine: onnx
annotator: WhisperForCTC
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Official pretrained Whisper model, adapted from HuggingFace transformer and curated to provide scalability and production-readiness using Spark NLP.

This is a multilingual model and supports the following languages:

Afrikaans, Arabic, Armenian, Azerbaijani, Belarusian, Bosnian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, Galician, German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Kannada, Kazakh, Korean, Latvian, Lithuanian, Macedonian, Malay, Marathi, Maori, Nepali, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swahili, Swedish, Tagalog, Tamil, Thai, Turkish, Ukrainian, Urdu, Vietnamese, and Welsh.

## Predicted Entities



{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/asr_whisper_tiny_opt_xx_5.1.0_3.0_1692721787993.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/asr_whisper_tiny_opt_xx_5.1.0_3.0_1692721787993.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
import sparknlp
from sparknlp.base import *
from sparknlp.annotator import *
from pyspark.ml import Pipeline

audioAssembler = AudioAssembler() \
.setInputCol("audio_content") \
.setOutputCol("audio_assembler")

speechToText = WhisperForCTC.pretrained("asr_whisper_tiny_opt", "xx") \
.setInputCols(["audio_assembler"]) \
.setOutputCol("text")

pipeline = Pipeline().setStages([audioAssembler, speechToText])
processedAudioFloats = spark.createDataFrame([[rawFloats]]).toDF("audio_content")
result = pipeline.fit(processedAudioFloats).transform(processedAudioFloats)
result.select("text.result").show(truncate = False)
```
```scala
import spark.implicits._
import com.johnsnowlabs.nlp.base._
import com.johnsnowlabs.nlp.annotators._
import com.johnsnowlabs.nlp.annotators.audio.WhisperForCTC
import org.apache.spark.ml.Pipeline

val audioAssembler: AudioAssembler = new AudioAssembler()
.setInputCol("audio_content")
.setOutputCol("audio_assembler")

val speechToText: WhisperForCTC = WhisperForCTC
.pretrained("asr_whisper_tiny_opt", "xx")
.setInputCols("audio_assembler")
.setOutputCol("text")

val pipeline: Pipeline = new Pipeline().setStages(Array(audioAssembler, speechToText))

val bufferedSource =
scala.io.Source.fromFile("src/test/resources/audio/txt/librispeech_asr_0.txt")

val rawFloats = bufferedSource
.getLines()
.map(_.split(",").head.trim.toFloat)
.toArray
bufferedSource.close

val processedAudioFloats = Seq(rawFloats).toDF("audio_content")

val result = pipeline.fit(processedAudioFloats).transform(processedAudioFloats)
result.select("text.result").show(truncate = false)
```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|asr_whisper_tiny_opt|
|Compatibility:|Spark NLP 5.1.0+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[audio_assembler]|
|Output Labels:|[text]|
|Language:|xx|
|Size:|242.7 MB|
109 changes: 109 additions & 0 deletions docs/_posts/DevinTDHa/2023-08-22-asr_whisper_tiny_xx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
layout: model
title: Official whisper-tiny
author: John Snow Labs
name: asr_whisper_tiny
date: 2023-08-22
tags: [whisper, en, audio, open_source, asr, xx, tensorflow]
task: Automatic Speech Recognition
language: xx
edition: Spark NLP 5.1.0
spark_version: 3.0
supported: true
engine: tensorflow
annotator: WhisperForCTC
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Official pretrained Whisper model, adapted from HuggingFace transformer and curated to provide scalability and production-readiness using Spark NLP.

This is a multilingual model and supports the following languages:

Afrikaans, Arabic, Armenian, Azerbaijani, Belarusian, Bosnian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, Galician, German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Italian, Japanese, Kannada, Kazakh, Korean, Latvian, Lithuanian, Macedonian, Malay, Marathi, Maori, Nepali, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swahili, Swedish, Tagalog, Tamil, Thai, Turkish, Ukrainian, Urdu, Vietnamese, and Welsh.

## Predicted Entities



{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/asr_whisper_tiny_xx_5.1.0_3.0_1692723111563.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/asr_whisper_tiny_xx_5.1.0_3.0_1692723111563.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
import sparknlp
from sparknlp.base import *
from sparknlp.annotator import *
from pyspark.ml import Pipeline

audioAssembler = AudioAssembler() \
.setInputCol("audio_content") \
.setOutputCol("audio_assembler")

speechToText = WhisperForCTC.pretrained("asr_whisper_tiny", "xx") \
.setInputCols(["audio_assembler"]) \
.setOutputCol("text")

pipeline = Pipeline().setStages([audioAssembler, speechToText])
processedAudioFloats = spark.createDataFrame([[rawFloats]]).toDF("audio_content")
result = pipeline.fit(processedAudioFloats).transform(processedAudioFloats)
result.select("text.result").show(truncate = False)
```
```scala
import spark.implicits._
import com.johnsnowlabs.nlp.base._
import com.johnsnowlabs.nlp.annotators._
import com.johnsnowlabs.nlp.annotators.audio.WhisperForCTC
import org.apache.spark.ml.Pipeline

val audioAssembler: AudioAssembler = new AudioAssembler()
.setInputCol("audio_content")
.setOutputCol("audio_assembler")

val speechToText: WhisperForCTC = WhisperForCTC
.pretrained("asr_whisper_tiny", "xx")
.setInputCols("audio_assembler")
.setOutputCol("text")

val pipeline: Pipeline = new Pipeline().setStages(Array(audioAssembler, speechToText))

val bufferedSource =
scala.io.Source.fromFile("src/test/resources/audio/txt/librispeech_asr_0.txt")

val rawFloats = bufferedSource
.getLines()
.map(_.split(",").head.trim.toFloat)
.toArray
bufferedSource.close

val processedAudioFloats = Seq(rawFloats).toDF("audio_content")

val result = pipeline.fit(processedAudioFloats).transform(processedAudioFloats)
result.select("text.result").show(truncate = false)
```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|asr_whisper_tiny|
|Compatibility:|Spark NLP 5.1.0+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[audio_assembler]|
|Output Labels:|[text]|
|Language:|xx|
|Size:|156.6 MB|
9 changes: 0 additions & 9 deletions docs/_posts/ahmedlone127/2023-05-19-match_pattern_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,7 @@ The match_pattern is a pretrained pipeline that we can use to process text with

## How to use

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("match_pattern", "en", "clinical/models")
result = pipeline.annotate("""I love johnsnowlabs! """)
```

</div>

{:.model-param}

Expand Down
32 changes: 0 additions & 32 deletions docs/_posts/ahmedlone127/2023-05-20-analyze_sentiment_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,7 @@ It performs most of the common text processing tasks on your dataframe

## How to use

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}

```python

from sparknlp.pretrained import PretrainedPipeline

pipeline = PretrainedPipeline('analyze_sentiment', lang = 'en')

result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""")


```
```scala

import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline = new PretrainedPipeline("analyze_sentiment", lang = "en")

val result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""")

```

{:.nlu-block}
```python

import nlu
text = ["""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!"""]
result_df = nlu.load('en.classify').predict(text)
result_df

```
</div>

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
Expand Down
26 changes: 0 additions & 26 deletions docs/_posts/ahmedlone127/2023-05-20-clean_pattern_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,7 @@ The clean_pattern is a pretrained pipeline that we can use to process text with

## How to use

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python


from sparknlp.pretrained import PretrainedPipelinein
pipeline = PretrainedPipeline('clean_pattern', lang = 'en')
annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0]
annotations.keys()
```
```scala


val pipeline = new PretrainedPipeline("clean_pattern", lang = "en")
val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0)
```

{:.nlu-block}
```python


import nlu
text = [""Hello from John Snow Labs ! ""]
result_df = nlu.load('en.clean.pattern').predict(text)
result_df
```
</div>

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
Expand Down
27 changes: 0 additions & 27 deletions docs/_posts/ahmedlone127/2023-05-20-clean_stop_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe

## How to use

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

from sparknlp.pretrained import PretrainedPipelinein
pipeline = PretrainedPipeline('clean_stop', lang = 'en')
annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0]
annotations.keys()

```
```scala

val pipeline = new PretrainedPipeline("clean_stop", lang = "en")
val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0)


```

{:.nlu-block}
```python

import nlu
text = [""Hello from John Snow Labs ! ""]
result_df = nlu.load('en.clean.stop').predict(text)
result_df

```
</div>

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
Expand Down
27 changes: 0 additions & 27 deletions docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_lg_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe

## How to use

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

from sparknlp.pretrained import PretrainedPipelinein
pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'fr')
annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0]
annotations.keys()

```
```scala

val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "fr")
val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0)


```

{:.nlu-block}
```python

import nlu
text = [""Bonjour de John Snow Labs! ""]
result_df = nlu.load('fr.ner').predict(text)
result_df

```
</div>

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
Expand Down
Loading