Shakespeare-YQG

Model Banner

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
Inference Examples
Unable to determine this model's library. Check the docs .