# Personalised opener
  This model creates an opener based on a provided interest.
### Model input
> [INTEREST]
### Example
> dancing

### Output
> What's your favorite dance move to make people laugh or cry?

### How to use in code
```{python}
import nltk
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("njvdnbus/personalised_opener-t5-large")
model = AutoModelForSeq2SeqLM.from_pretrained("njvdnbus/personalised_opener-t5-large")

def use_model(text):
    inputs = ["" + text]
    inputs = tokenizer(inputs, truncation=True, return_tensors="pt")
    output = model.generate(**inputs, num_beams=1, do_sample=True, min_length=10, max_length=256)
    decoded_output = tokenizer.batch_decode(output, skip_special_tokens=True)[0]
    predicted_interests = nltk.sent_tokenize(decoded_output.strip())[0]
    return predicted_interests

text= "tennis"
print(use_model(text))
```

> Do you think tennis is the most exciting sport out there?
{"language": ["en"], "metrics": ["rouge"]}
transformers pytorch t5 text2text-generation en autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #t5 #text2text-generation #en #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

# Personalised opener
  This model creates an opener based on a provided interest.
### Model input
> [INTEREST]
### Example
> dancing

### Output
> What's your favorite dance move to make people laugh or cry?

### How to use in code


> Do you think tennis is the most exciting sport out there?
# Personalised opener
  This model creates an opener based on a provided interest. ### Model input
> [INTEREST] ### Example
> dancing ### Output
> What's your favorite dance move to make people laugh or cry? ### How to use in code


> Do you think tennis is the most exciting sport out there?
TAGS
#transformers #pytorch #t5 #text2text-generation #en #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 # Personalised opener
  This model creates an opener based on a provided interest. ### Model input
> [INTEREST] ### Example
> dancing ### Output
> What's your favorite dance move to make people laugh or cry? ### How to use in code


> Do you think tennis is the most exciting sport out there?
TAGS
#transformers #pytorch #t5 #text2text-generation #en #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
# Personalised opener
  This model creates an opener based on a provided interest.### Model input
> [INTEREST]### Example
> dancing### Output
> What's your favorite dance move to make people laugh or cry?### How to use in code


> Do you think tennis is the most exciting sport out there?