File size: 2,310 Bytes
3eabe1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Gujarati AI Poetry Generator

## 🌟 Introduction
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**.

## ✨ Features
- **Gujarati BPE Tokenizer**: Custom-built tokenizer for efficient text generation.
- **Fine-tuned GPT Model**: Leveraging GPT-J/GPT-2 for Gujarati poetry generation.
- **Dataset**: Based on structured English-Gujarati poetry pairs.
- **Use Cases in Satsang**: AI-driven tools for **kirtan composition, scripture analysis, and poetic expressions**.

## 🛠️ Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/gujarati-ai-poetry.git
cd gujarati-ai-poetry

# Install dependencies
pip install -r requirements.txt
```

## 📜 Dataset Structure
The training dataset follows this format:
```json
{
    "gujarati": [
        {
            "title_gu": "પ્રકરણ ૧: મંગળાચરણ",
            "title_trans": "Prakaran 1: Mangaḷācharaṇ",
            "target": "મંગલમૂર્તિ મહાપ્રભુ, શ્રીસહજાનંદ સુખરૂપ...",
            "source": "The divine Lord is the embodiment of joy and beauty..."
        }
    ]
}
```

## 🚀 Training & Fine-Tuning
To train the model:
```bash
python train.py --model gpt-j --dataset cleaned_final_data.json
```
To fine-tune GPT-2 from scratch:
```bash
python train_gpt2.py --epochs 5 --batch_size 8
```

## 🔥 Inference Example
```python
from model import generate_poetry
prompt = "The divine Lord is the embodiment of joy and beauty."
response = generate_poetry(prompt)
print(response)
```

## 🎯 Future Enhancements
- Improving **rhyme and meter** matching.
- Expanding dataset with **more scriptures & kirtans**.
- Deploying a **web-based interface** for real-time poetry generation.

## 🌟 Contribute
Feel free to open issues and pull requests! Your contributions can help refine AI-driven Gujarati poetry generation.

## 📜 License
This project is licensed under the **MIT License**.

---
🔗 *For more AI & Satsang insights, connect with me on LinkedIn!*

---
license: mit
---