Metadata-Version: 2.4
Name: genai_textkit
Version: 0.1.8
Summary: A no-API-key, CPU-friendly GenAI library for text generation, summarization, sentiment classification, and translation.
License: MIT
Project-URL: Homepage, https://github.com/IamAbhinav01/GenAI
Project-URL: Documentation, https://github.com/IamAbhinav01/GenAI#readme
Project-URL: Repository, https://github.com/IamAbhinav01/GenAI
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: accelerate>=1.9.0
Requires-Dist: transformers>=4.40.0
Requires-Dist: pytest


# 🧠 GenAI-TextKit

A minimal, CPU-friendly, no-API-key-required **LLM-powered Python library** — for text generation, summarization, sentiment classification, and translation.

> ⚡ Just `pip install genai_textkit` and you're ready to build with GenAI-TextKit on any machine.

---

## 🚀 Features

- ✅ Offline text generation with `distilgpt2`
- ✅ Fast summarization with `distilbart-cnn-12-6`
- ✅ Sentiment classification using `distilbert-sst2`
- ✅ Multilingual translation via `facebook/nllb-200-distilled-600M`
- ✅ Works on **CPU** — no GPU required
- ✅ No API keys, no internet after install

---

## 📦 Installation


# Step 1: Install GenAI-TextKit
pip install genai_textkit
# Step 2: (If not already installed) Install PyTorch manually
pip install torch --index-url https://download.pytorch.org/whl/cpu
```


Author: Abhinav | GitHub: [IamAbhinav01](https://github.com/IamAbhinav01)
Repository: [IamAbhinav01/GenAI](https://github.com/IamAbhinav01/GenAI)

---

## 🚀 Features

- ✅ Offline text generation with `distilgpt2`
- ✅ Fast summarization with `distilbart-cnn-12-6`
- ✅ Sentiment classification using `distilbert-sst2`
- ✅ Multilingual translation via `facebook/nllb-200-distilled-600M`
- ✅ Works on **CPU** — no GPU required
- ✅ No API keys, no internet after install

---

## 📦 Installation

```bash
pip install genai_textkit
```

---

## 🏁 Quick Start

```python

from genai_textkit import generate, summarize, classify, translate

# Text generation
print(generate("Write a poem about the moon", max_tokens=50))

# Summarization
print(summarize("Your long text here..."))

# Sentiment Classification
print(classify("I really loved the product!"))

# Translation (English to Hindi)
print(translate("I am happy to meet you", to_lang="hi"))
```

---

## 🌍 Supported Translation Languages

| Code | Language   |
|------|------------|
| en   | English    |
| hi   | Hindi      |
| ta   | Tamil      |
| ml   | Malayalam  |
| fr   | French     |
| es   | Spanish    |
| bn   | Bengali    |

---

## 📂 Project Structure

```
genai-toolkit/
│
├── genai/                # Core package
│   ├── __init__.py       # Public API
│   ├── text.py           # generate, summarize, classify, translate
│   ├── config.py         # Device/model paths
│   └── download_models.py# Download models utility
│
├── examples/             # Usage examples
│   ├── example_generate.py
│   ├── example_summarize.py
│   ├── example_translate.py
│   └── example_classify.py
│
├── tests/                # Unit tests
│   └── test_text.py
│
├── requirements.txt      # Python dependencies
├── pyproject.toml        # Project metadata
├── README.md             # Project documentation
└── ...                   # Other files
```

---

## 🧪 Run Examples

See the `examples/` folder for ready-to-run scripts.

## 🤝 Contributing

Pull requests and issues are welcome! Please open an issue or PR on [GitHub](https://github.com/IamAbhinav01/GenAI).

## 📄 License

MIT License © Abhinav


