Skip to content

cropland-bv/ai_christmas_card_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

AI Christmas Card App

This repository contains the code we developed for the Christmas card generator we launched at the end of 2022. The application allows end users to generate a personalized Christmas card. The text on the card is generated by a GPT-2 checkpoint which was finetuned on a corpus of Christmas/New Year's wishes. The image on the card is generated with a stable diffusion model that is hosted by stability.ai.

training_gpt2

The code to fine-tune the GPT-2 checkpoint can be found as a Jupyter notebook under training_gpt2. The code uses Python and the transformers library to pull a GPT-2 checkpoint from the HuggingFace hub and to fine-tune the model.

You can open the notebook and run the experiments in Google Colab for free. To do so, simply click this link: https://colab.research.google.com/github/cropland-bv/ai_christmas_card_app/blob/main/training_gpt2/THIRD_notebook_Fine%20tuning%20try2.ipynb. You will want to use a hardware-accelerated runtime for optimal performance.

ui

The code to build the user interface in Shiny can be found under ui. The code showcases how to use Shiny with a UI that is completely written in HTML and CSS. In addition, it constitutes a good example of how to use the future package to build asynchronous applications with Shiny.

LICENSE

Everything in this repository is released for educative purposes under the terms of the Creative Commons Attribution 4.0 International (CC BY 4.0) license (https://creativecommons.org/licenses/by/4.0/). In general, this means that you are free to:

  • Share — copy and redistribute the material in any medium or format
  • Adapt — remix, transform, and build upon the material for any purpose, even commercially.

Under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.