Description
This model is based on BioGPT finetuned with medical conversations happening in a clinical settings and can answer clinical questions related to symptoms, drugs, tests, and diseases. The difference between this model and biogpt_chat_jsl
is that this model produces more concise/smaller response.
Predicted Entities
How to use
document_assembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("documents")
gpt_qa = MedicalTextGenerator.pretrained("biogpt_chat_jsl_conversational", "en", "clinical/models")\
.setInputCols("documents")\
.setOutputCol("answer").setMaxNewTokens(100)
pipeline = Pipeline().setStages([document_assembler, gpt_qa])
data = spark.createDataFrame([["How to treat asthma ?"]]).toDF("text")
pipeline.fit(data).transform(data)
val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")
val summarizer = MedicalTextGenerator.pretrained("biogpt_chat_jsl_conversational", "en", "clinical/models")
.setInputCols("documents")
.setOutputCol("answer").setMaxNewTokens(100)
val pipeline = new Pipeline().setStages(Array(document_assembler, summarizer))
val text = "How to treat asthma ?"
val data = Seq(Array(text)).toDS.toDF("text")
val result = pipeline.fit(data).transform(data)
Results
question: How to treat asthma ? answer: You have to take montelukast + albuterol tablet once or twice in day according to severity of symptoms. Montelukast is used as a maintenance therapy to relieve symptoms of asthma. Albuterol is used as a rescue therapy when symptoms are severe. You can also use inhaled corticosteroids ( ICS ) like budesonide or fluticasone for long term treatment.
Model Information
Model Name: | biogpt_chat_jsl_conversational |
Compatibility: | Healthcare NLP 4.4.0+ |
License: | Licensed |
Edition: | Official |
Language: | en |
Size: | 1.4 GB |
Case sensitive: | true |