Metadata-Version: 2.4
Name: gai-lab-ese
Version: 1.1.0
Summary: GAI Lab ESE experiments (TensorFlow/Keras and Hugging Face): exact code, full theory and viva questions
Author: Amey Jagannath Sonvadkar
License: MIT
Keywords: generative-ai,lab,vae,gan,diffusion,cyclegan,education
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Provides-Extra: tf
Requires-Dist: tensorflow; extra == "tf"
Requires-Dist: matplotlib; extra == "tf"
Requires-Dist: pandas; extra == "tf"
Requires-Dist: scikit-learn; extra == "tf"
Provides-Extra: audio
Requires-Dist: librosa; extra == "audio"
Requires-Dist: soundfile; extra == "audio"
Requires-Dist: matplotlib; extra == "audio"
Provides-Extra: hf
Requires-Dist: torch; extra == "hf"
Requires-Dist: transformers; extra == "hf"
Requires-Dist: datasets; extra == "hf"
Requires-Dist: accelerate; extra == "hf"
Requires-Dist: matplotlib; extra == "hf"
Provides-Extra: cyclegan
Requires-Dist: tensorflow; extra == "cyclegan"
Requires-Dist: tensorflow-datasets; extra == "cyclegan"
Requires-Dist: matplotlib; extra == "cyclegan"
Provides-Extra: all
Requires-Dist: tensorflow; extra == "all"
Requires-Dist: tensorflow-datasets; extra == "all"
Requires-Dist: matplotlib; extra == "all"
Requires-Dist: pandas; extra == "all"
Requires-Dist: scikit-learn; extra == "all"
Requires-Dist: librosa; extra == "all"
Requires-Dist: soundfile; extra == "all"
Requires-Dist: torch; extra == "all"
Requires-Dist: transformers; extra == "all"
Requires-Dist: datasets; extra == "all"
Requires-Dist: accelerate; extra == "all"
Dynamic: license-file

# gai-lab-ese

Generative-AI lab experiments (**GAI Lab ESE**) as a pip package: the **exact code** of every notebook as a `.txt`/`.py` file, a **full theory + code walkthrough + viva questions** for each experiment, the original notebooks, and `music.wav`.

## Install
```bash
pip install --upgrade gai-lab-ese              # code + theory
pip install --upgrade "gai-lab-ese[all]"       # + everything needed to run all experiments
pip install --upgrade "gai-lab-ese[tf]"        # Exp 1, 2, 5, 9
pip install --upgrade "gai-lab-ese[hf]"        # Exp 3, Prac
pip install --upgrade "gai-lab-ese[audio]"     # Exp 6
pip install --upgrade "gai-lab-ese[cyclegan]"  # Exp 7
```
Colab / Jupyter: put `!` in front, e.g. `!pip install --upgrade gai-lab-ese` and `!gai-lab-ese --list`.

## Command line
```bash
gai-lab-ese --list                         # list experiments
gai-lab-ese --show vae                    # title + theory + full source
gai-lab-ese --theory vae                  # only theory / viva explanation
gai-lab-ese --code vae                    # only code
gai-lab-ese --save vae --out vae.py
gai-lab-ese --save-all --out gai_code       # all: .py, .txt, theory and original notebooks
gai-lab-ese --data --out gai_data           # datasets
gai-lab-ese --all --out gai_all             # code + theory + datasets in one folder
gai-lab-ese --run vae                    # run an experiment
```

## Python
```python
from gai_lab_ese import list_experiments, show_experiment, get_source, get_theory, save_experiment, save_all, run_experiment, download_all

list_experiments()
show_experiment("vae")              # title, theory, then the full Python source
print(get_theory("vae"))            # viva explanation only
code = get_source("vae")
save_experiment("vae", "vae.py")
download_all("gai_all")
```

## Experiments
| # | Name (aliases) | Experiment |
|---|---|---|
| 1 | `vae` (exp1, autoencoder, ae) | Autoencoder + Variational Autoencoder on MNIST (TensorFlow/Keras) |
| 2 | `gan` (exp2) | GAN on MNIST (TensorFlow) |
| 3 | `gpt2_finetune` (exp3, gpt2, text_generation, finetune) | Fine-tuning DistilGPT2 on AI text + sampling strategies (Hugging Face) |
| 5 | `deepfake` (exp5, faceswap, deepfake_ae) | Autoencoder DeepFake: shared encoder + two decoders (MNIST 6 <-> 8) |
| 6 | `music` (exp6, jukebox, audio) | Generated music analysis: WAV check, waveform, spectrogram |
| 7 | `cyclegan` (exp7, style_transfer, horse2zebra) | CycleGAN Horse2Zebra style transfer (TensorFlow) |
| 9 | `diffusion` (exp9, ddpm) | Simple DDPM diffusion model on 2-D data (TensorFlow) |
| P | `prac` (practice, gpt2_practice) | Practice: DistilGPT2 fine-tuning (Hugging Face) |
| E1 | `markov` (markov_chain, text_markov, e1) | Text generation with Markov chains (random only, offline) |
| E2 | `genetic_image` (genetic, ga, genetic_algorithm, e2) | Image generation with a genetic algorithm (numpy + matplotlib, offline) |
| E3 | `evolution_image` (evolution, evolutionary, hill_climb, e3) | Evolutionary vector image generator (numpy only, offline) |

Experiments E1-E3 (Markov chain text, genetic-algorithm image, evolutionary image) are 100% offline and need only `random` / `numpy` / `matplotlib`. Original notebooks: `gai-lab-ese --notebook vae` (saves Exp1.ipynb). In Colab, Colab already has TensorFlow, PyTorch and transformers, so `pip install gai-lab-ese` is enough.

See **PUBLISHING.md** for how to upload this package to PyPI.

## License
MIT
