pub fn generate(
        &self,
        prompt_texts: Option<Vec<&str>>,
        attention_mask: Option<Tensor>,
    ) -> Vec<String> {
        match *self {
            Self::Marian(ref model) => model.generate(prompt_texts, attention_mask),
            Self::T5(ref model) => model.generate(prompt_texts, attention_mask),
        }
    }
/// Interface method to generate() of the particular models.
Interface method to generate() of the particular models.
Interface method to generate () of the particular models .
pub fn generate(
        &self,
        prompt_texts: Option<Vec<&str>>,
        attention_mask: Option<Tensor>,
    ) -> Vec<String> {
        match *self {
            Self::Marian(ref model) => model.generate(prompt_texts, attention_mask),
            Self::T5(ref model) => model.generate(prompt_texts, attention_mask),
        }
    }
pub fn generate ( & self , prompt_texts : Option < Vec < & str > > , attention_mask : Option < Tensor > , ) -> Vec < String > { match * self { Self :: Marian ( ref model ) => model . generate ( prompt_texts , attention_mask ) , Self :: T5 ( ref model ) => model . generate ( prompt_texts , attention_mask ) , } }
Interface method to generate() of the particular models.
Interface method to generate () of the particular models .
&self
prompt_texts
Option<Vec<&str>>
attention_mask
Option<Tensor>
&self
prompt_texts
Option<Vec<&str>>
attention_mask
Option<Tensor>