hfs_backend_exemple / README.md
cduss's picture
Make Me v1: voice/text-prompted photo transformation
18e1208
|
Raw
History Blame Contribute Delete
1.38 kB
metadata
title: Make Me
emoji: 🎭
colorFrom: red
colorTo: yellow
sdk: docker
pinned: false
app_port: 7860
hf_oauth: true
hf_oauth_expiration_minutes: 480

Make Me

A Reachy Mini photobooth powered by FLUX.1-Kontext. Users sign in with HuggingFace, connect to a robot, type or speak a prompt ("turn me into a medieval king"), and the robot captures a photo that gets transformed by FLUX.1-Kontext.

Architecture

  • Frontend: Vanilla JS + WebRTC via reachy-mini.js
  • Backend: FastAPI (Docker SDK)
  • Voice input: Whisper-large-v3-turbo via HF Inference Providers (Groq)
  • Image transform: FLUX.1-Kontext-Dev Gradio Space via gradio_client
  • Inference is paid by the Space owner — see HF_TOKEN secret below

Required Space Secret

Add these in Settings → Variables and secrets:

Secret Purpose
HF_TOKEN Required. Your HuggingFace token with inference-api + read-repos scopes. All Whisper + FLUX calls use this token, so your HF Inference Providers credits get charged.

Optional env vars (defaults shown):

  • TRANSFORM_DAILY_LIMIT=10 — per-user FLUX transforms per day
  • TRANSCRIBE_DAILY_LIMIT=50 — per-user voice transcriptions per day

Local dev

export HF_TOKEN=hf_xxx
export OAUTH_CLIENT_ID=...  # optional, from HF OAuth app
pip install -r requirements.txt
uvicorn app:app --port 7860