compliment-forest / README.md
thangvip's picture
Update README.md
bdbccf2 verified
|
Raw
History Blame Contribute Delete
6.31 kB

A newer version of the Gradio SDK is available: 6.20.0

Upgrade
metadata
title: The Compliment Forest
emoji: 🌿
colorFrom: green
colorTo: yellow
sdk: gradio
sdk_version: 6.16.0
python_version: 3.12
app_file: app.py
fullWidth: true
header: mini
pinned: true
license: apache-2.0
short_description: Turn a worry into a grounded, illustrated path forward.
models:
  - build-small-hackathon/compliment-forest-minicpm5-1b
  - build-small-hackathon/compliment-forest-flux-lora
  - openbmb/MiniCPM4.1-8B
  - black-forest-labs/FLUX.1-schnell
  - thangvip/compliment-forest-watercolor-flux-lora-v2
  - thangvip/compliment-forest-paper-cut-flux-lora-v2
  - thangvip/compliment-forest-moonlit-gouache-flux-lora-v2
  - thangvip/compliment-forest-botanical-ink-flux-lora-v2
datasets:
  - build-small-hackathon/compliment-forest-sft
  - build-small-hackathon/compliment-forest-watercolor
  - build-small-hackathon/compliment-forest-traces
  - thangvip/compliment-forest-multistyle-v2
tags:
  - gradio
  - build-small-hackathon
  - minicpm
  - modal
  - text-to-image
  - llama.cpp
  - track:backyard
  - sponsor:openbmb
  - sponsor:openai
  - sponsor:modal
  - achievement:welltuned
  - achievement:offbrand
  - achievement:sharing
  - achievement:fieldnotes

The Compliment Forest

The Compliment Forest turns a worry into a five-chapter illustrated walk. It asks five adaptive questions, separates facts from fearful predictions, offers realistic options, suggests one small action, and ends with a simple plan the visitor can carry back into the day.

This is whimsical encouragement, not therapy or a substitute for professional support. Crisis and acute-risk inputs stop before model generation and direct the visitor toward human help.

Backyard AI: The Real Problem

The Compliment Forest is built for the Backyard AI track. It addresses an everyday problem in modern society: people carry worries about test results, changing jobs, belonging, comparison, and an uncertain future, but the support they receive is often vague or disconnected from what actually happened.

The product gives a person a private place to explain one real concern in their own words. It asks what feels at stake, separates known facts from fearful predictions, and turns the conversation into understandable options and one small action. The illustrated forest makes that difficult reflection feel less clinical and easier to approach, while the practical content remains grounded in the person's situation.

Try It

Why It Is AI-Native

A fixed template cannot know whether a low test score hurts because of identity, comparison, uncertainty, or a specific learning gap. The forest uses an adaptive intake and a planner-author-critic pipeline to build a different path for each visitor.

The five roles have distinct jobs:

  1. arrive acknowledges the feeling and concrete concern once.
  2. steady separates known facts from the outcome fear predicts.
  3. widen offers realistic interpretations or options.
  4. step gives one small, optional, low-risk action.
  5. carry leaves a simple plan or decision rule.

Local validators reject repeated prose, repeated long source phrases, invented dates or actions, unsupported biography, stock abstraction, and a step chapter without practical help. Failed chapters are regenerated selectively. If repair still fails, the app tries one fresh forest and then returns an honest error instead of canned encouragement.

Small-Model Stack

The live text and image stack is about 25B parameters in total, below the hackathon's 32B total limit.

  • Text: openbmb/MiniCPM4.1-8B, hosted on a Modal A100 endpoint.
  • Images: black-forest-labs/FLUX.1-schnell with four rank-16 style LoRAs, hosted on a separate Modal A100 80GB endpoint.
  • Local path: the published 1.08B MiniCPM5 fine-tune is available as a Q4_K_M GGUF through llama.cpp.
  • Training: the MiniCPM and FLUX adapters, validation runs, and deployment experiments used Modal.

Text and image inference scale independently. The canonical hackathon Space is a CPU orchestrator: it serves the custom interface, validates requests, streams NDJSON progress, and HMAC-signs calls directly to the two Modal services. No credential is stored in the public repository.

Published Artifacts

Sponsor Work

OpenBMB: MiniCPM is the core language model family for planning, authoring, critique, adaptive intake, and the published local fine-tune.

Modal: Modal powered text and image inference, LoRA training, GGUF validation, and the independently scaling GPU endpoints used by the live app.

OpenAI Codex: Codex was used throughout implementation and debugging: reading the codebase, writing tests, tracing malformed structured output, redesigning the prompt and quality gates, deploying Space revisions, and verifying full live flows.

Run Locally

uv sync --extra dev
uv run python app.py

The default local backend is deterministic. To run the published local text model through llama.cpp:

CF_TEXT_BACKEND=llama_cpp
CF_IMAGE_BACKEND=flux
uv run --extra inference python app.py

Verification

uv run pytest -q \
  --ignore=tests/test_build_multistyle_dataset.py \
  --ignore=tests/test_dataset_builder.py

Current maintained result: 155 passed.