ShakespeareYQG-v1 / README.md
NightPrince's picture
Update README.md
1f98c21 verified
|
raw
history blame
2.19 kB
metadata
license: apache-2.0
language:
  - en
pipeline_tag: text-generation

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.