My daughter loves everything panda. To brighten her day, a different panda-themed image is sent to her by SMS message each morning.
Datestamp | |
Base prompt | |
Generated prompt | |
Error message | |
Azure Resources
- (Same key vault, Databricks service and cluster, storage account, and OpenAI service as News2Pic.)
- Databricks notebook created and attached to cluster.
- Data Factory, a pipeline with a single activity linked to the Databricks notebook and set to trigger daily.
- SMS/Communication service, Databricks access to endpoint via secret scope key stored in key vault.
Databricks Notebook (Python)
- Generate text prompt via OpenAI GPT-4o model (random.choice() used to randomize panda vocations).
- Generate image via OpenAI Dall-E, using the text prompt.
- Update image paths in this page's HTML, pointing to newly generated image.
- Copy generated image and updated HTML to web app folder (of this website).
- Send this page's URL via SMS (Open Graph meta tags help preview image within SMS message [to do: use MMS instead]).