├── .gitignore ├── Chapter2 ├── clip_score.py ├── moderator.py ├── stable_diff.py └── util.py ├── Chapter3 ├── data.csv └── original_transformer.py ├── Chapter4 ├── DOCKERFILE ├── app.py ├── benchmark.py ├── ci-cd.yml ├── data │ ├── gpt3_descriptions.csv │ ├── gptneo_descriptions.csv │ ├── img │ │ ├── image_1.jpg │ │ ├── image_10.jpg │ │ ├── image_11.jpg │ │ ├── image_12.jpg │ │ ├── image_13.jpg │ │ ├── image_14.jpg │ │ ├── image_15.jpg │ │ ├── image_16.jpg │ │ ├── image_17.jpg │ │ ├── image_18.jpg │ │ ├── image_19.jpeg │ │ ├── image_2.jpg │ │ ├── image_3.jpg │ │ ├── image_4.jpg │ │ ├── image_5.jpg │ │ ├── image_6.jpg │ │ ├── image_7.jpg │ │ ├── image_8.jpg │ │ └── image_9.jpg │ ├── product_data.csv │ ├── reference_data.csv │ └── test_data.csv ├── dev_requirements.txt ├── eval_clip.py ├── eval_rouge.py ├── eval_semantic.py ├── fastapi.py ├── minimal_gpt_neo.py ├── project_init.bat ├── project_init.sh └── requirements.txt ├── Chapter5 ├── qa_demo.json └── task_specific.py ├── Chapter6 ├── domain_adapt.py ├── score.py ├── test.txt └── train.txt ├── Chapter7 ├── eval_rag.py ├── products │ └── products.csv └── rag.py ├── Chapter8 ├── constrained_rag.py └── products │ └── products.csv ├── LICENSE ├── README.md └── utils └── img_prepro.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/.gitignore -------------------------------------------------------------------------------- /Chapter2/clip_score.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter2/clip_score.py -------------------------------------------------------------------------------- /Chapter2/moderator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter2/moderator.py -------------------------------------------------------------------------------- /Chapter2/stable_diff.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter2/stable_diff.py -------------------------------------------------------------------------------- /Chapter2/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter2/util.py -------------------------------------------------------------------------------- /Chapter3/data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter3/data.csv -------------------------------------------------------------------------------- /Chapter3/original_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter3/original_transformer.py -------------------------------------------------------------------------------- /Chapter4/DOCKERFILE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/DOCKERFILE -------------------------------------------------------------------------------- /Chapter4/app.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/app.py -------------------------------------------------------------------------------- /Chapter4/benchmark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/benchmark.py -------------------------------------------------------------------------------- /Chapter4/ci-cd.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/ci-cd.yml -------------------------------------------------------------------------------- /Chapter4/data/gpt3_descriptions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/gpt3_descriptions.csv -------------------------------------------------------------------------------- /Chapter4/data/gptneo_descriptions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/gptneo_descriptions.csv -------------------------------------------------------------------------------- /Chapter4/data/img/image_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_1.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_10.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_11.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_12.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_13.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_14.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_15.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_16.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_17.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_18.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_19.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_19.jpeg -------------------------------------------------------------------------------- /Chapter4/data/img/image_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_2.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_3.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_4.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_5.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_6.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_7.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_8.jpg -------------------------------------------------------------------------------- /Chapter4/data/img/image_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/img/image_9.jpg -------------------------------------------------------------------------------- /Chapter4/data/product_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/product_data.csv -------------------------------------------------------------------------------- /Chapter4/data/reference_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/reference_data.csv -------------------------------------------------------------------------------- /Chapter4/data/test_data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/data/test_data.csv -------------------------------------------------------------------------------- /Chapter4/dev_requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/dev_requirements.txt -------------------------------------------------------------------------------- /Chapter4/eval_clip.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/eval_clip.py -------------------------------------------------------------------------------- /Chapter4/eval_rouge.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/eval_rouge.py -------------------------------------------------------------------------------- /Chapter4/eval_semantic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/eval_semantic.py -------------------------------------------------------------------------------- /Chapter4/fastapi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/fastapi.py -------------------------------------------------------------------------------- /Chapter4/minimal_gpt_neo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/minimal_gpt_neo.py -------------------------------------------------------------------------------- /Chapter4/project_init.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/project_init.bat -------------------------------------------------------------------------------- /Chapter4/project_init.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/project_init.sh -------------------------------------------------------------------------------- /Chapter4/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter4/requirements.txt -------------------------------------------------------------------------------- /Chapter5/qa_demo.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter5/qa_demo.json -------------------------------------------------------------------------------- /Chapter5/task_specific.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter5/task_specific.py -------------------------------------------------------------------------------- /Chapter6/domain_adapt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter6/domain_adapt.py -------------------------------------------------------------------------------- /Chapter6/score.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter6/score.py -------------------------------------------------------------------------------- /Chapter6/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter6/test.txt -------------------------------------------------------------------------------- /Chapter6/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter6/train.txt -------------------------------------------------------------------------------- /Chapter7/eval_rag.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter7/eval_rag.py -------------------------------------------------------------------------------- /Chapter7/products/products.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter7/products/products.csv -------------------------------------------------------------------------------- /Chapter7/rag.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter7/rag.py -------------------------------------------------------------------------------- /Chapter8/constrained_rag.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter8/constrained_rag.py -------------------------------------------------------------------------------- /Chapter8/products/products.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/Chapter8/products/products.csv -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/README.md -------------------------------------------------------------------------------- /utils/img_prepro.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Generative-AI-Foundations-in-Python/HEAD/utils/img_prepro.py --------------------------------------------------------------------------------