Spaces:
Running
Running
lerp666
tricket: AI product-ad video studio (GLM script + FLUX scenes + Kokoro TTS + ffmpeg)
e1d94af A newer version of the Gradio SDK is available: 6.19.0
metadata
title: Tricket
emoji: π¬
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 6.5.1
app_file: app.py
pinned: false
short_description: One prompt β a vertical product ad video
π¬ tricket β one prompt β a product ad video
Describe a product and tricket produces a finished vertical (9:16) ad:
- GLM-4.6 (via the HF inference router) writes a multi-scene ad script.
- FLUX.1-schnell paints each scene.
- Kokoro voices the narration (English or δΈζ).
- ffmpeg cuts it together β Ken Burns motion, burned captions, voiceover β into an MP4.
All GPU work runs on-demand on Modal and scales to zero when idle.
Built for the build-small hackathon.
Architecture
HF Space (Gradio, this repo) Modal.com (app: tricket-flux)
app.py ββ GLM script (HF router)
ββ Model.generate (FLUX.1-schnell, A100) per scene
ββ TTS.synth (Kokoro, CPU) per scene
ββ assemble_video (ffmpeg, CPU) β 9:16 MP4
Two tabs: π¬ Ad Studio (the pipeline above) and πΌ Single Image (plain FLUX text-to-image).
Setup (for maintainers)
- Deploy the backend (Modal CLI authenticated):
modal secret create huggingface HF_TOKEN=hf_xxx # FLUX is gated modal deploy modal_app.py - Set this Space's secrets (Settings β Variables and secrets):
MODAL_TOKEN_ID,MODAL_TOKEN_SECRETβ call Modal from the SpaceHF_TOKENβ used by the GLM script writer (router.huggingface.co)