Spaces:
Running on Zero
Running on Zero
Commit History
-
Ship the API examples and the local vision-path verifier Running
Two scripts that were previously kept out of the repo, plus the API docs they document. api_examples.py All four ways to call /respond: gradio_client, the raw two-step HTTP route (POST /gradio_api/call/v2/respond -> GET .../respond/{event_id} over SSE), the MCP server, and the attachment contract. Also documents the quota model, which is the thing that actually bites: ZeroGPU charges the reservation rather than the time used, and an anonymous visitor gets 2 minutes a day, so a handful of calls exhausts it. Passing hf_token= to the client moves the quota onto your own account. Note the SSE parser uses rstrip("\r\n"), not rstrip("\n"). Gradio sends CRLF, and a stray \r makes the blank-line test never fire - the stream then yields nothing at all and silently returns an empty list. verify_vision_local.py Runs the real app.py against real weights, without a GPU and without spending ZeroGPU quota. Qwen/Qwen3.5-0.8B shares this architecture family - both report Qw…5d7ffac -
Fix crash when the system prompt is left empty
ChatInterface publishes an additional input with a null default when the widget has no value, so an empty system prompt arrived as None and to_messages() died on None.strip() before the GPU was ever requested: AttributeError: 'NoneType' object has no attribute 'strip' - gr.Textbox(value='') so the API default is '' rather than null, and to_messages() coerces None anyway. - respond() now fills in every additional input that arrives as None, and clamps max_new_tokens to the configured ceiling, since the GPU reservation is sized from it. - Build the Blocks at import time as a module level "demo", which is what Gradio's hot reload looks for (it logged 'Launching demo not found'). Verified against a local harness that runs the real app.py and the real Qwen3VL processor with only the "spaces" package and the 27B weights stubbed: all-None defaults, empty and explicit system prompts, thinking mode, a text attachment, an image attachment, image+text together, and the token cap al…8d138ee -
Document the API attachment contract and trim the GPU reservation floor
- README: gradio_client needs handle_file() for attachments; passing bare paths is rejected by Gradio's FileData API validation and shows up as an unhelpful 'the app raised an exception'. Also documents SHOW_ERROR. - The message shape, not its content, is what goes into the error text. - MIN_GPU_SECONDS (45, was a hard-coded 60): the ZeroGPU quota is charged on the reservation rather than on time actually used, and anonymous visitors only get 2 minutes a day.ee29e06 -
Surface attachment and prompt-building failures instead of an opaque error
Any exception raised while normalising an upload or rendering the chat template reached the user as 'the Gradio app raised an exception'. Attachments are now coerced through one normalise_path() helper that accepts a plain path, a {path: ...} dict, or a FileData object, and both failure points raise a gr.Error that names the exception, plus print the traceback to the Space logs. Also adds SHOW_ERROR=1 to opt into Gradio's verbose errors.aeeec42 -
Serve Qwen3.8-27B as a multimodal chat demo on ZeroGPU
- app.py: load Qwen/Qwen3.8-27B (27.8B dense VLM) in bf16 on cuda at module level, stream replies via TextIteratorStreamer, render the thinking block as a collapsed Reasoning bubble, accept images and text attachments. - @spaces.GPU(size='xlarge'): the bf16 weights are ~54.7 GB and do not fit the default 48 GB slice; a dynamic duration sizes the reservation from the token budget. QUANTIZE=4bit switches to NF4 on the default large slice. - requirements.txt: transformers 5.15.0 / accelerate 1.14.0 / bitsandbytes 0.50.1 pinned to the combination validated on the ZeroGPU Blackwell backend. - README.md: startup_duration_timeout 1h (the weights take a while to load), model declaration and full usage docs.ee1a3b3 -
Add application file
d758417 -
initial commit
Verified signaturecaaa436