A Streamlit app that uses the Google Gemini API to generate recipe blog posts.
The application requires a Google API key for Gemini. The key should never be committed to version control.
- Create a file named
.envin the project root (see.env.example). - Add your key:
GOOGLE_API_KEY=your_real_key_here
- The repo already ignores
.envvia.gitignore.
- Use repository Secrets (Settings → Secrets & variables → Actions) to store
GOOGLE_API_KEY. - Workflows can reference it as
${{ secrets.GOOGLE_API_KEY }}. - If the key was ever pushed, rotate it immediately and remove it from history with
git filter-repo.
- Open your project on Vercel.
- Go to Settings → Environment Variables.
- Add
GOOGLE_API_KEYwith the secret value for the relevant environment (Production/Preview/Development).
The code uses python-dotenv to load .env during local development and os.getenv("GOOGLE_API_KEY") at runtime.