Views
No views yet
tony_stark_chatbot is based on the DialoGPT-medium model, a powerful GPT-based architecture designed for generating conversational responses. It has been fine-tuned on a dataset of Tony Stark's dialogues from Marvel movie transcripts.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained('diabolic6045/tony_stark_chatbot')
4model = AutoModelForCausalLM.from_pretrained('diabolic6045/tony_stark_chatbot')
5
6input_text = "What's your favorite hobby?"
7input_tokens = tokenizer.encode(input_text, return_tensors='pt')
8output_tokens = model.generate(input_tokens, max_length=50, num_return_sequences=1)
9output_text = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
10
11print(output_text)DialoGPT-medium model by Microsoft. Special thanks to the Hugging Face team and Microsoft for their contributions to the NLP community and Marvel for providing Dataset to train this model.