Shakespeare-YQG
Creator: Yahya Muhammad Alnwsany
Model Type: Text Generation Model
Languages Supported: English
Intended Use: Creative writing, text generation, and experimentation
π Overview
Shakespeare-YQG is a fine-tuned language model crafted to emulate the writing style of William Shakespeare. It generates creative and poetic texts, making it ideal for artistic projects, educational use, and entertaining exploration of Shakespearean language.
This model leverages cutting-edge natural language processing techniques to blend the charm of classical literature with modern text generation capabilities.
β¨ Features
- Custom Fine-Tuning: Inspired by the works of William Shakespeare.
- User-Friendly: Ready to use with Gradio interface and Hugging Face Spaces.
- Interactive Demo: Experience text generation live on Hugging Face.
π Usage
Hereβs how to use the model in your Python project:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("NightPrince/Shakespeare-YQG")
model = AutoModelForCausalLM.from_pretrained("NightPrince/Shakespeare-YQG")
# Provide an input prompt
prompt = "To be or not to be, that is"
inputs = tokenizer(prompt, return_tensors="pt")
# Generate text
outputs = model.generate(inputs["input_ids"], max_length=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# π Interactive Demo
Try the live demo of Shakespeare-YQG here:
This demo allows you to generate text interactively using Gradio. You can input your own prompts, adjust parameters, and watch the magic unfold in Shakespearean language!
# π Dataset
The model was trained on a carefully curated dataset consisting of Shakespeareβs works
and similar Elizabethan-style texts.
This ensures that the generated outputs stay true to the style and elegance of classical literature.
- Downloads last month
- 4