Edit model card

Model Card for Model ID

A movie recommendation chatbot which is finetune from GODEL model using data generated from ChatGPT.

Model Details

  • Model type: seq2seq(T5)
  • License: MIT
  • Finetuned from model: microsoft/GODEL-v1_1-base-seq2seq
  • Final eval loss: 0.2027

Limitations

This model is trained using supervised learning on small amount of movie conversation data so it is not that good.
There is also a smaller version of this at bluenguyen/movie_chatbot_v1.

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("bluenguyen/movie_chatbot_large_v1")
model = AutoModelForSeq2SeqLM.from_pretrained("bluenguyen/movie_chatbot_large_v1").to('cuda')

def current_context(dialog, instruction):
    dialog = ' EOS '.join(dialog)
    context = f"{instruction} [CONTEXT] {dialog} "
    return context

def generate(context):
    input_ids = tokenizer(f"{context}", return_tensors="pt").input_ids.to('cuda')
    outputs = model.generate(input_ids, max_length=128, min_length=8, top_p=0.9, do_sample=True)
    output = tokenizer.decode(outputs[0], skip_special_tokens=True)
    return output

instruction = f'Instruction: given a dialog about movie recommendation, you need to respond based on human preferences.'
dialog = [
    'Do you have any recommendation about a movie?',
    'Yes! Any particular genre that you\'d like to see mentioned?',
]
print('User: ' + dialog[0])
print('Bot: ' + dialog[1])
while(1):
    print('User: ', end = '')
    query = input()
    if query == 'end':
        break
    dialog.append(query)
    response = generate(current_context(dialog, instruction))
    print('Bot: ' + response)
    dialog.append(response)

Demo

Example 1:

User: Do you have any recommendation about a movie?
Bot: Yes! Any particular genre that you'd like to see mentioned?
User: Maybe somthing heartfelt please
Bot: How about "The Fault in Our Stars"? It's a romantic drama about two teenagers with terminal illnesses who fall in love.
User: Is the ending sad?
Bot: Yes, it's definitely emotional but also inspiring. It's definitely worth watching.
User: Ok, give me another one
Bot: Have you seen "A Walk to Remember"? It's another emotional drama that explores the themes of love, grief and redemption.
User: Tell me more about the plot
Bot: The plot is about a man with terminal cancer who falls in love with a young girl who has terminal cancer. It's a beautiful and heartbreaking movie that will leave you feeling good.
User: It seems that you got it wrong
Bot: I'm sorry, I'm an AI language model, so I may have missed some things. Is there anything else I can help you with?
User: Ok, enough with sad stuff, give some movie to lighten the mood
Bot: How about "Eternal Sunshine of the Spotless Mind"? It's a romantic sci-fi drama that explores the concept of memory and love.
User: Good, who play the main character?
Bot: The lead role is played by Jodie Foster and Ryan Gosling, who both give fantastic performances.
User: You are wrong again, but it's ok
Bot: It's okay. Just remember that I'm just an AI language model and I can only provide a wide range of information.
User: Good bye, I will improve you later, don't worry
Bot: Alright then, have a great day!
User: end

Example 2:

User: Do you have any recommendation about a movie?
Bot: Yes! Any particular genre or genre that you'd like to see mentioned?
User: I like funny action movies
Bot: How about "Deadpool"? It's an action-comedy movie about a superhero who has to save the world from a dark forces.
User: Tell me more about the main character
Bot: The main character, Ryan Reynolds, is known for his intelligence and intelligence-sharing abilities, and he is the go-to guy for superhero teams. Ryan Reynolds' character is played by Ryan Reynolds, and he gets a lot of laughs from the audience.
User: Cool, give me another movie
Bot: Sure, what genre are you interested in?
User: I like movie about fighting
Bot: How about "John Wick"? It's an action-thriller movie about a retired hitman who comes out of retirement to avenge his dog's death.
User: What happen to his dog?
Bot: His dog, Theodore, is killed by a group of thugs, and he must hunt down and take down the people who killed his dog. He is played by Keanu Reeves, and he does a lot of fighting scenes that are impressive.
User: Thank you
Bot: You're welcome! Let me know if you need any other recommendations.
User: end

Example 3:

User: Do you have any recommendation about a movie?
Bot: Yes! Any particular genre that you'd like to see mentioned?
User: I am in a mood for something crazy tonight
Bot: Have you seen "Gone Girl"? It's a fantastic movie about a man whose wife disappears and he becomes the prime suspect. It's a gripping thriller with a twist ending.
User: What is the twist?
Bot: The twist happens when the husband becomes the prime suspect in his wife's disappearance. As the story unfolds, it becomes clear that things are not as they seem.
User: Ok, give me another one
Bot: Sure thing! How about "The Prestige"? It's a mystery thriller about two magicians who are rivals in their craft. The movie is a mind-bending tale of obsession and intrigue that will keep you on the edge of your seat.
User: Ok cool, tell me more
Bot: It's based on the classic novel of the same name by J.K. Simmons. The movie stars Hugh Jackman and Christian Bale as the rival magicians and has received critical acclaim for its plot twists, performances, and direction.
User: Thank you
Bot: You're welcome! Let me know if you need any more suggestions.
User: end

Model Card Contact

For personal questions related to this model, please contact via reddotbluename@gmail.com

Downloads last month
0
Inference Examples
Inference API (serverless) has been turned off for this model.