Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/audiodude/endless-love-letters
Scripts for generating love letters for my wife via AI
https://github.com/audiodude/endless-love-letters
Last synced: about 2 months ago
JSON representation
Scripts for generating love letters for my wife via AI
- Host: GitHub
- URL: https://github.com/audiodude/endless-love-letters
- Owner: audiodude
- License: mit
- Created: 2023-09-14T16:53:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-09T05:56:57.000Z (4 months ago)
- Last Synced: 2024-10-15T00:47:08.723Z (3 months ago)
- Language: Python
- Size: 333 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Endless Love Letters
This is the source code for the site at https://endless-love-letters.com
Since 2019, I have written my wife Abby a love letter every day, for a total of 1458 captured
at the time of the Google Takeout export.These scripts take an `.mbox` file with a bunch of love letter emails, parse them out, feed them to
the OpenAI GPT 3.5 finetuning API to finetune a model, then generate new love letters.The web interface includes both v1 (static love letter list generated with some pre-GPT charNN-like
solution whose name has been lost) and v2 (love letters generated on the fly with ChatGPT).## Populating the SECRETS file
Look at `SECRETS.example` for the tokens which should go into `SECRETS`, which is a JSON file.
Neither the site nor the command line tools will function without the `SECRETS` being set.## Generating a love letter offline
Offline meaning without the web app, this still contacts the OpenAI API.
Just run:
```bash
python generate.py
```Note that the prompts and model id are hardcoded into the script.
## Generating the database
In MySQL, run:
```sql
CREATE DATABASE endless_love_leeters;
```Then load the schema:
```bash
mysql -u -p endless_love_letters < schema.sql
```## Running the web app locally
```bash
FLASK_DEBUG=1 FLASK_APP=app pipenv run flask run
```## Deploying to fly,io
1. Install the Fly.io command line tool, `flyctl`
```bash
fly deploy
```