Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,71 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Gujarati AI Poetry Generator
|
2 |
+
|
3 |
+
## 🌟 Introduction
|
4 |
+
This project explores the intersection of **Artificial Intelligence** and **Satsang literature** by generating **Gujarati poetry** inspired by the works of great poets like **Nishkulanand Swami**. Using AI models, this tool transforms English prompts into **meaningful, poetic Gujarati verses**.
|
5 |
+
|
6 |
+
## ✨ Features
|
7 |
+
- **Gujarati BPE Tokenizer**: Custom-built tokenizer for efficient text generation.
|
8 |
+
- **Fine-tuned GPT Model**: Leveraging GPT-J/GPT-2 for Gujarati poetry generation.
|
9 |
+
- **Dataset**: Based on structured English-Gujarati poetry pairs.
|
10 |
+
- **Use Cases in Satsang**: AI-driven tools for **kirtan composition, scripture analysis, and poetic expressions**.
|
11 |
+
|
12 |
+
## 🛠️ Installation
|
13 |
+
```bash
|
14 |
+
# Clone the repository
|
15 |
+
git clone https://github.com/yourusername/gujarati-ai-poetry.git
|
16 |
+
cd gujarati-ai-poetry
|
17 |
+
|
18 |
+
# Install dependencies
|
19 |
+
pip install -r requirements.txt
|
20 |
+
```
|
21 |
+
|
22 |
+
## 📜 Dataset Structure
|
23 |
+
The training dataset follows this format:
|
24 |
+
```json
|
25 |
+
{
|
26 |
+
"gujarati": [
|
27 |
+
{
|
28 |
+
"title_gu": "પ્રકરણ ૧: મંગળાચરણ",
|
29 |
+
"title_trans": "Prakaran 1: Mangaḷācharaṇ",
|
30 |
+
"target": "મંગલમૂર્તિ મહાપ્રભુ, શ્રીસહજાનંદ સુખરૂપ...",
|
31 |
+
"source": "The divine Lord is the embodiment of joy and beauty..."
|
32 |
+
}
|
33 |
+
]
|
34 |
+
}
|
35 |
+
```
|
36 |
+
|
37 |
+
## 🚀 Training & Fine-Tuning
|
38 |
+
To train the model:
|
39 |
+
```bash
|
40 |
+
python train.py --model gpt-j --dataset cleaned_final_data.json
|
41 |
+
```
|
42 |
+
To fine-tune GPT-2 from scratch:
|
43 |
+
```bash
|
44 |
+
python train_gpt2.py --epochs 5 --batch_size 8
|
45 |
+
```
|
46 |
+
|
47 |
+
## 🔥 Inference Example
|
48 |
+
```python
|
49 |
+
from model import generate_poetry
|
50 |
+
prompt = "The divine Lord is the embodiment of joy and beauty."
|
51 |
+
response = generate_poetry(prompt)
|
52 |
+
print(response)
|
53 |
+
```
|
54 |
+
|
55 |
+
## 🎯 Future Enhancements
|
56 |
+
- Improving **rhyme and meter** matching.
|
57 |
+
- Expanding dataset with **more scriptures & kirtans**.
|
58 |
+
- Deploying a **web-based interface** for real-time poetry generation.
|
59 |
+
|
60 |
+
## 🌟 Contribute
|
61 |
+
Feel free to open issues and pull requests! Your contributions can help refine AI-driven Gujarati poetry generation.
|
62 |
+
|
63 |
+
## 📜 License
|
64 |
+
This project is licensed under the **MIT License**.
|
65 |
+
|
66 |
+
---
|
67 |
+
🔗 *For more AI & Satsang insights, connect with me on LinkedIn!*
|
68 |
+
|
69 |
+
---
|
70 |
+
license: mit
|
71 |
+
---
|