Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,46 +1,11 @@
|
|
| 1 |
-
# HawkFranklin Certificate Agent (Gradio)
|
| 2 |
-
|
| 3 |
-
Generate polished **Certificates of Experience** with a fixed baseline template, optional letterhead, and one-click **HTML → PDF** export. Includes an optional **AI style assistant** powered by `openai/gpt-oss-20b` to suggest color palettes and tone tweaks.
|
| 4 |
-
|
| 5 |
-
## Modes
|
| 6 |
-
- **CPU Basic + Docker (Recommended for PDF):** full HTML→PDF via WeasyPrint. Set hardware to *CPU Basic*, Space SDK to *Docker*, and keep the Dockerfile.
|
| 7 |
-
- **ZeroGPU (No Docker):** exposes a `@spaces.GPU` palette helper and disables server-side PDF. Set Space SDK to *Gradio (Python)*, set `ZERO_GPU=1` in Space Secrets, and **remove the Dockerfile** from the repo.
|
| 8 |
-
|
| 9 |
-
## Quick Start (Local)
|
| 10 |
-
```bash
|
| 11 |
-
python -m venv .venv && source .venv/bin/activate
|
| 12 |
-
pip install -r requirements.txt
|
| 13 |
-
python app.py
|
| 14 |
-
```
|
| 15 |
-
Then open the Gradio URL.
|
| 16 |
-
|
| 17 |
-
> **macOS**: If WeasyPrint complains about Cairo/Pango, install via Homebrew:
|
| 18 |
-
> ```bash
|
| 19 |
-
> brew install cairo pango gdk-pixbuf
|
| 20 |
-
> ```
|
| 21 |
-
|
| 22 |
-
## Hugging Face Space
|
| 23 |
-
### CPU Basic + Docker
|
| 24 |
-
- Keep Dockerfile, push repo, set hardware to **CPU Basic**.
|
| 25 |
-
- Optional: set `USE_OSS_MODEL=1` to enable the style assistant without GPU.
|
| 26 |
-
|
| 27 |
-
### ZeroGPU (Gradio SDK)
|
| 28 |
-
- Remove Dockerfile from repo.
|
| 29 |
-
- Add Space Secret `ZERO_GPU=1` (and `USE_OSS_MODEL=1` if you want the OSS model).
|
| 30 |
-
- The app includes `@spaces.GPU` function `suggest_palette_with_gpu` and calls it when you click **Suggest Palette (AI)**.
|
| 31 |
-
- PDF export is disabled (no system libs). Download HTML and print-to-PDF client-side or use an external API.
|
| 32 |
-
|
| 33 |
-
## Usage
|
| 34 |
-
1. Upload your `HawkFranklin_letterhead_may.jpg` (optional).
|
| 35 |
-
2. Fill recipient, project, duration, signer, etc.
|
| 36 |
-
3. Click **Build Preview**.
|
| 37 |
-
4. Click **Export** to download HTML (and PDF on CPU Basic + Docker).
|
| 38 |
-
5. Use **AI Style Assistant** to get palettes.
|
| 39 |
-
|
| 40 |
-
## Roadmap
|
| 41 |
-
- CSV batch generation
|
| 42 |
-
- Signature image field
|
| 43 |
-
- External HTML→PDF API fallback for ZeroGPU
|
| 44 |
-
|
| 45 |
---
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: HawkFranklin Certificate Generator
|
| 3 |
+
emoji: 🧾
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.44.1"
|
| 8 |
+
python_version: "3.10.13"
|
| 9 |
+
app_file: app.py
|
| 10 |
+
pinned: false
|
| 11 |
+
---
|