pdf-trainer-api / README.md
Avinashnalla7's picture
Email confirmation on send-config
bcf3c84
metadata
title: PDF Trainer API
emoji: 📡
colorFrom: blue
colorTo: purple
sdk: docker
app_file: app.py
pinned: false

FastAPI service for PDF Trainer (pdf upload/download + send-config + notify-unknown).

Save configuration email

When the Trainer UI calls POST /api/send-config, the API stores the JSON config and (optionally) emails a confirmation with the config JSON + original PDF attached.

Set these env vars on the pdf-trainer-api Space:

  • PDF_PIPELINE_PIPELINE_NOTIFY_TO (recipient email for confirmations)
  • PDF_PIPELINE_NOTIFY_FROM (must be the same Gmail account you OAuth’d)
  • GMAIL_CREDENTIALS_JSON + GMAIL_TOKEN_JSON (paste full JSON contents; or use PDF_PIPELINE_GMAIL_CREDENTIALS_JSON / PDF_PIPELINE_GMAIL_TOKEN_JSON)