NightPrince
commited on
Commit
•
1f98c21
1
Parent(s):
846495f
Update README.md
Browse files
README.md
CHANGED
@@ -4,35 +4,63 @@ language:
|
|
4 |
- en
|
5 |
pipeline_tag: text-generation
|
6 |
---
|
7 |
-
# Shakespeare
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
## Intended Use
|
13 |
-
- **Primary Use Case**: Generate creative text in the style of William Shakespeare.
|
14 |
-
- **Input**: A seed text provided by the user.
|
15 |
-
- **Output**: A continuation of the seed text in Shakespearean style.
|
16 |
|
17 |
-
## How to Use
|
18 |
-
You can interact with the model through the Gradio interface available on the Hugging Face Space. Simply enter your seed text and specify the number of words you want to generate.
|
19 |
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
The model was evaluated based on its ability to generate coherent and stylistically accurate text. User feedback and qualitative analysis were used to assess performance.
|
25 |
|
26 |
-
## Limitations
|
27 |
-
- The model may not always generate grammatically correct or meaningful text.
|
28 |
-
- It is limited to the style and vocabulary present in the training data.
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
|
34 |
-
## Acknowledgements
|
35 |
-
This project was inspired by the rich literary heritage of William Shakespeare and aims to bring his style to modern text generation applications.
|
36 |
|
37 |
-
## Contact
|
38 |
-
For questions or feedback, please contact [Your Name] at [Your Email].
|
|
|
4 |
- en
|
5 |
pipeline_tag: text-generation
|
6 |
---
|
7 |
+
# Shakespeare-YQG
|
8 |
|
9 |
+
![Model Banner](https://huggingface.co/NightPrince/Shakespeare-YQG/blob/main/assets/model-banner.png)
|
10 |
+
|
11 |
+
**Creator**: Yahya Muhammad Alnwsany
|
12 |
+
**Model Type**: Text Generation Model
|
13 |
+
**Languages Supported**: English
|
14 |
+
**Intended Use**: Creative writing, text generation, and experimentation
|
15 |
+
|
16 |
+
---
|
17 |
+
|
18 |
+
## 📜 Overview
|
19 |
+
|
20 |
+
**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.
|
21 |
+
|
22 |
+
This model leverages cutting-edge natural language processing techniques to blend the charm of classical literature with modern text generation capabilities.
|
23 |
+
|
24 |
+
---
|
25 |
+
|
26 |
+
## ✨ Features
|
27 |
+
|
28 |
+
- **Custom Fine-Tuning**: Inspired by the works of William Shakespeare.
|
29 |
+
- **User-Friendly**: Ready to use with Gradio interface and Hugging Face Spaces.
|
30 |
+
- **Interactive Demo**: Experience text generation live on Hugging Face.
|
31 |
+
|
32 |
+
---
|
33 |
+
|
34 |
+
## 🚀 Usage
|
35 |
+
|
36 |
+
Here’s how to use the model in your Python project:
|
37 |
+
|
38 |
+
```python
|
39 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
40 |
+
|
41 |
+
# Load the model and tokenizer
|
42 |
+
tokenizer = AutoTokenizer.from_pretrained("NightPrince/Shakespeare-YQG")
|
43 |
+
model = AutoModelForCausalLM.from_pretrained("NightPrince/Shakespeare-YQG")
|
44 |
+
|
45 |
+
# Provide an input prompt
|
46 |
+
prompt = "To be or not to be, that is"
|
47 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
48 |
+
|
49 |
+
# Generate text
|
50 |
+
outputs = model.generate(inputs["input_ids"], max_length=50)
|
51 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
52 |
|
|
|
|
|
|
|
|
|
53 |
|
|
|
|
|
54 |
|
55 |
+
# 🌐 Interactive Demo
|
56 |
+
Try the live demo of Shakespeare-YQG here:
|
57 |
|
58 |
+
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!
|
|
|
59 |
|
|
|
|
|
|
|
60 |
|
61 |
+
# 📂 Dataset
|
62 |
+
The model was trained on a carefully curated dataset consisting of Shakespeare’s works
|
63 |
+
and similar Elizabethan-style texts.
|
64 |
+
This ensures that the generated outputs stay true to the style and elegance of classical literature.
|
65 |
|
|
|
|
|
66 |
|
|
|
|