fix(hf-space): run on CPU basic; disable Gradio SSR (Node sidecar) - #21
Merged
Conversation
The Space showed a runtime error — "No @spaces.GPU function detected during startup" — which HF only raises on ZeroGPU hardware; this app is CPU-only, so it must run on CPU basic. Document that (README + suggested_hardware: cpu-basic) and disable Gradio's SSR (GRADIO_SSR_MODE=false + ssr_mode=False) so the Space is plain server-rendered Python with no Node sidecar — leaner on free CPU.
Owner
Author
|
Closing: the Hugging Face deployment is being removed in #22 (Gradio Spaces are no longer free), so this runtime fix is moot. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Space at
picault/conflensshows a runtime error:No @spaces.GPU function detectedis only raised on ZeroGPU hardware, which requires a@spaces.GPU-decorated function. ConfLens is CPU-only (LLM calls go out over HTTP; no local GPU work), so on ZeroGPU HF refuses to start it. The app itself booted fine (Running on local URL …).Fix
Two parts:
suggested_hardware: cpu-basicin the Space metadata.Node proxy -> Python). This CPU app doesn't need it, sospace_app.pynow setsGRADIO_SSR_MODE=falseand passesssr_mode=False— plain server-rendered Python, fewer moving parts on free CPU.Testing
space_app.pylocally with SSR disabled → HTTP 200, and the log now shows a plainRunning on local URLwith no Node/SSR proxy line.ruffclean.What you need to do on HF
picault/conflenshardware to CPU basic.sdk: gradio/space_app.py/requirements.txt.HF_TOKEN(repo secret) belongs to picault with write access, and add your LLM key(s) as Space secrets.After merging, the sync workflow (with the
picaultowner fix from #20) will push and the Space should come up on CPU.Generated by Claude Code