alex4cip Claude commited on
Commit
3228df9
Β·
1 Parent(s): 42fba8e

fix: Disable queue system to resolve HTTP/2 SSE errors

Browse files

- Add concurrency_limit=None to ChatInterface
- Add enable_queue=False to demo.launch()
- Prevents ERR_HTTP2_PROTOCOL_ERROR on HF Spaces
- Removes /gradio_api/queue/data SSE endpoint
- Removes /gradio_api/heartbeat connection checks

This fixes persistent HTTP/2 protocol errors even on PRO tier
by disabling Server-Sent Events (SSE) streaming entirely.
Trade-off: No token-by-token streaming, but stable operation.

πŸ€– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -275,6 +275,7 @@ with gr.Blocks(
275
  elem_classes="chatbot-input",
276
  show_label=False,
277
  ),
 
278
  )
279
 
280
  # Examples section with model switching
@@ -358,4 +359,5 @@ with gr.Blocks(
358
  )
359
 
360
  if __name__ == "__main__":
361
- demo.launch()
 
 
275
  elem_classes="chatbot-input",
276
  show_label=False,
277
  ),
278
+ concurrency_limit=None, # 큐 λΉ„ν™œμ„±ν™”λ‘œ HTTP/2 SSE 였λ₯˜ λ°©μ§€
279
  )
280
 
281
  # Examples section with model switching
 
359
  )
360
 
361
  if __name__ == "__main__":
362
+ # 큐 μ™„μ „ λΉ„ν™œμ„±ν™”λ‘œ HTTP/2 ν”„λ‘œν† μ½œ 였λ₯˜ λ°©μ§€
363
+ demo.launch(enable_queue=False)