Spaces:
Running on Zero
Replace ZeroGPU demo with Gradio studio and H200 endpoint
Replace the current in-process ZeroGPU demo with the Gradio Studio and Workflow from andito/Drama-3. The Space runs on CPU and streams speech from the existing authenticated HuggingFaceM4/drama-3-h200 endpoint. HuggingFaceM4 continues to host the endpoint and cover its traffic.
The replacement includes:
- The styled Studio, real
gr.Workflowtab, streaming player, take history, director's notes, retakes, and audio downloads. - Surprise as the first/default voice mode, reordered clone presets, voice design, uploaded/recorded references, and automatic transcription.
- HF sign-in, guest/account allowances, shared admission limits, and the current generation reliability and transport improvements. Sampling defaults remain temperature 1, top-p 0.9, and uncapped top-k.
- The endpoint server recipe, pinned deployment configuration, scripts, and tests for review and reproducibility. Merging does not redeploy or alter the endpoint.
The previous app.py, vendored local inference code, and ZeroGPU requirements are removed. This is a full app replacement, including removal of the previous voice-consent checkbox.
Required Space settings
- Switch the Space's hardware from ZeroGPU to CPU Basic.
- Add
DRAMA_ENDPOINT_TOKENas a Space Secret, using the dedicated token authorized to make calls to Inference Endpoints in HuggingFaceM4. The token was tested successfully; its value is not included in this PR. - Restart after configuring the hardware and Secret, if the Space has not already restarted automatically.
The endpoint URL is included in Dockerfile and can optionally be overridden with DRAMA_ENDPOINT_URL. hf_oauth: true is included in the README configuration, so HF supplies the sign-in credentials automatically. The endpoint token is used only by the server and is never sent to the browser.
No persistent storage setup is required. Usage counts and Workflow edits use temporary storage and reset on restart. The README documents optional persistence separately.
Validation
- All 60 tests passed against the staged replacement, covering generation safeguards, streaming, cancellation, quotas, endpoint authentication, and the Studio/Workflow adapters.
- Live calls through the staged app's Gradio
/performand Workflow/performanceAPIs completed against the H200 endpoint using the dedicated token, and their completed WAVs were downloadable and non-silent. - Public page/config/status responses and generation results were checked for credential exposure; the upload allowlist was scanned for credentials, including the dedicated token. No secrets are included.
The app files match the running source Space at the revision linked above; the only additional change is the README handover instructions. The Docker image was not rebuilt locally, and HF sign-in on the destination requires the merged Space's runtime configuration.