English T5ForConditionalGeneration Cased model (from gagan3012)

Description

Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. k2t-test is a English model originally trained by gagan3012.

Download Copy S3 URI

How to use

documentAssembler = DocumentAssembler() \
    .setInputCols("text") \
    .setOutputCols("document")

t5 = T5Transformer.pretrained("t5_gagan3012_k2t_test","en") \
    .setInputCols("document") \
    .setOutputCol("answers")
    
pipeline = Pipeline(stages=[documentAssembler, t5])

data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text")

result = pipeline.fit(data).transform(data)
val documentAssembler = new DocumentAssembler() 
      .setInputCols("text")
      .setOutputCols("document")
       
val t5 = T5Transformer.pretrained("t5_gagan3012_k2t_test","en") 
    .setInputCols("document")
    .setOutputCol("answers")
   
val pipeline = new Pipeline().setStages(Array(documentAssembler, t5))

val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text")

val result = pipeline.fit(data).transform(data)

Model Information

Model Name: t5_gagan3012_k2t_test
Compatibility: Spark NLP 4.3.0+
License: Open Source
Edition: Official
Input Labels: [documents]
Output Labels: [t5]
Language: en
Size: 242.7 MB

References

  • https://huggingface.co/gagan3012/k2t-test
  • https://pypi.org/project/keytotext/
  • https://pepy.tech/project/keytotext
  • https://colab.research.google.com/github/gagan3012/keytotext/blob/master/notebooks/K2T.ipynb
  • https://share.streamlit.io/gagan3012/keytotext/UI/app.py
  • https://github.com/gagan3012/keytotext#api
  • https://hub.docker.com/r/gagan30/keytotext
  • https://keytotext.readthedocs.io/en/latest/?badge=latest
  • https://github.com/psf/black
  • https://socialify.git.ci/gagan3012/keytotext/image?description=1&forks=1&language=1&owner=1&stargazers=1&theme=Light