# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: AutoFigure-Edit
spec:
    description: Turn research paper method sections into fully editable SVG scientific figures using AI
    coverImage: https://www.svgrepo.com/show/530403/picture.svg
    icon: https://www.svgrepo.com/show/530403/picture.svg
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain you want to bind to your AutoFigure-Edit instance
        - key: HF_TOKEN
          type: STRING
          name: HF_TOKEN
          description: Required Hugging Face access token for RMBG-2.0 background removal model
    tags:
        - AI
        - Research
        - Tool
    readme: |-
        # AutoFigure-Edit
        Turn research paper method sections into fully editable SVG scientific figures using AI.
        ## Required
        | Variable | Description |
        |----------|-------------|
        | `HF_TOKEN` | Hugging Face access token — get it at [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens), requires access to [briaai/RMBG-2.0](https://huggingface.co/briaai/RMBG-2.0) |
        ## Optional (configure in the web UI after deployment)
        - **OpenRouter API Key** — for multimodal model access
        - **Roboflow API Key** — for SAM3 segmentation (free tier available)
    services:
        - name: autofigure-edit
          icon: https://www.svgrepo.com/show/530403/picture.svg
          template: GIT
          spec:
            id: autofigure-edit
            source:
                source: GITHUB
                repo: 1149127835
                branch: main
            ports:
                - id: web
                  port: 8000
                  type: HTTP
            volumes:
                - id: outputs
                  dir: /app/outputs
                - id: uploads
                  dir: /app/uploads
                - id: hf-cache
                  dir: /app/.cache/huggingface
            env:
                HF_TOKEN:
                    default: ${HF_TOKEN}
                PORT:
                    default: "8000"
          domainKey: PUBLIC_DOMAIN
