backprop.models.t5_qa_summary_emotion¶
backprop.models.t5_qa_summary_emotion.model¶
-
class
T5QASummaryEmotion(model_path=None, name: Optional[str] = None, description: Optional[str] = None, details: Optional[Dict] = None, tasks: Optional[List[str]] = None, device=None)[source]¶ Bases:
backprop.models.hf_seq2seq_tg_model.model.HFSeq2SeqTGModelInitialises a T5 model that has been finetuned on qa, summarisation and emotion detection.
-
model_path¶ path to an appropriate T5 model on huggingface (kiri-ai/t5-base-qa-summary-emotion)
-
name¶ string identifier for the model. Lowercase letters and numbers. No spaces/special characters except dashes.
-
description¶ String description of the model.
-
tasks¶ List of supported task strings
-
details¶ Dictionary of additional details about the model
-
device¶ Device for model. Defaults to “cuda” if available.
-
__call__(task_input, task='text-generation')[source]¶ Uses the model for the chosen task
- Parameters
task_input – input dictionary according to the chosen task’s specification
task – one of text-generation, emotion, summarisation, qa
-
training: bool¶
-