Spaces:
Runtime error
A newer version of the Gradio SDK is available: 6.26.0
title: Respite API
emoji: 🤖
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 6.3.0
app_file: app.py
pinned: false
Respite API
A CPU-based Hugging Face Space for generating music using Stability AI's Stable Audio 3 Small model.
Features
- Model:
small-music(433M parameters) - Duration: 1–120 seconds
- Sample rate: 44.1 kHz stereo
- Runs on CPU (only a 1s ZeroGPU touch at startup; no GPU quota used per request)
- Gradio 6.3.0 interface
This Space is configured for CPU inference. ZeroGPU Spaces fail to boot unless at least one spaces.GPU function is called, so app.py calls one minimal @spaces.GPU(duration=1) function a single time at startup. Keep every other function (especially generation) undecorated so no GPU allocation happens per request.
API discovery endpoints
Respite API exposes machine-readable API metadata alongside the Gradio UI:
GET /api/resourceslists callable capabilities, including each resource's method, endpoint, inputs, and output.GET /api/specslists server-wide specifications such as version, supported content types, limits, discovery URLs, CPU cores, total RAM, and storage total/used/free space.
Both endpoints return JSON and currently require no authentication. The metadata is designed to grow as additional AI capabilities are added.
Usage
- Enter a text prompt describing the music you want
- Adjust duration, steps, CFG scale, and seed
- Click Generate and wait for the audio
Setup
pip install -r requirements.txt
python app.py
License
This project uses the Stable Audio 3 model. Please refer to Stability AI's license for usage terms.