Spaces:
Running
Running
Commit History
-
Stream chat over SSE unbuffered so HF's proxy forwards tokens live
Devdan Schretlen +1: Claude Opus 4.8On Hugging Face Spaces the proxy buffered the /api/chat SSE response until generation finished, so the browser showed nothing during a reply and the server never detected client disconnects -- an abandoned slow request kept running and held the per-model generation lock, blocking every later request (the "not responding" symptom). Add Cache-Control / X-Accel-Buffering / Connection headers and flush an initial SSE comment so tokens stream immediately and a disconnect frees the lock. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>a847960 -
Add MicroGPT chat demo: FastAPI + React app, Dockerfile, gpt3.1 model
Devdan Schretlen +1: Claude Opus 4.8Brings the GPTs chatbot into the Space: server/ (FastAPI SSE backend), models/, common.py, and the prebuilt web/dist frontend, served on a single origin via Docker (CPU PyTorch, uvicorn on port 7860). The gpt3.1_chat.pth checkpoint is stored in bf16 (~0.6 GB) via Git LFS so it fits the free Space's 1 GB storage limit; it is upcast to fp32 at load time for CPU inference. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>8b12a0a