Spaces:
Running on Zero
Running on Zero
Commit History
-
Report chat errors by raising gr.Error Running
Port the error-handling fix already applied to gemma-4-12b-it. Drop the try/except that reported failures as a final {"error": ...} data message and raise gr.Error directly, including the input-too-long case. The frontend now subscribes to "status" events so the raised error reaches the client iterator instead of being swallowed. This relies on gradio closing the JS client iterator on a terminal error (gradio 6.18.0+), which the recent upgrade to 6.19.0 satisfies.967e1cb
-
Switch chat UI to gr.Server custom frontend
Replace the Gradio Chatbot UI with a custom frontend served through gr.Server, backed by static HTML, CSS, and JavaScript under static/. Highlights: - Drag-and-drop and paste file upload with media previews, a size cap, and a lightbox for images and video. - Example prompts on the empty state, including image, audio, and video media, shown in a responsive grid with thumbnails and a file count badge. Clicking an example replaces the current attachments. - A left sidebar that holds Clear chat and a settings disclosure, with responsive behavior on narrow screens. - Generation settings (temperature, top_p, top_k, repetition penalty) validated against a shared params spec, each with a short description. - Markdown and math rendering with HTML sanitization, syntax-highlighted code blocks with a pinned copy button, dark mode, and an error banner. - Edit last to take back the previous turn, and robust stop and error handling in the streaming path (worker thread reclaim on stream…63bc571