Spaces:
Running
Running
Commit History
-
Document automatic model path resolution in README Running
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>0924645 -
Resolve model paths automatically instead of a runAsContainer flag
The flag was inconsistent in both directions. main.py left it False, so the Space re-downloaded bert-base-uncased and the CLIP processor from the Hub on every boot even though the Dockerfile bakes both into the image — making startup depend on Hub availability and wasting those build steps. Meanwhile CLIPEncoder ignored the flag entirely and hardcoded /models/clip, so captioning could not run outside a container at all. Replace it with model_source(), which prefers the baked copy when the path exists and falls back to the Hub when it does not. Both the Space and local dev now work with no flag to set. Verified locally: the encoder resolves to the Hub and produces a caption identical to the Space's. Also pass args.quantized through in the CLI, which parsed --quantized and then dropped it on the floor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>ad2704e -
Pin dependencies, drop dead route, rewrite README
Pin every direct dependency to the versions the Space is verified running on. These were loose, which is how a Starlette major bump landed on an unrelated rebuild and broke /cbow. Starlette is pinned explicitly even though FastAPI pulls it in, since FastAPI's allowed range spans majors. jinja2 is now listed too — main.py uses Jinja2Templates directly, so it was a direct dependency masked by a transitive install. Verified the set resolves clean in python:3.11-slim. Remove the second GET /contentdistillery handler. FastAPI serves the first match, so it was unreachable, and it read a root-level contentdistillery.html that does not exist. Rewrite the README: it still described the summarizer as "coming soon" and never mentioned Word Alchemy. Document all three tools, the routes, where the weights are pulled from, local dev, the two-remote deploy, and the CPU/pinning constraints that caused the recent outage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>afa1634 -
Fix /cbow 500: use current Starlette TemplateResponse signature
Starlette dropped the legacy TemplateResponse(name, context) argument order, so "cbow.html" was being taken as the request and the context dict as the template name: TypeError: unhashable type: 'dict' in Jinja2Templates.get_template(). fastapi/starlette are unpinned in requirements.txt, so the Space picked this up on a rebuild. Switch to TemplateResponse(request, name, context). Also reuse the module-level MeaningCalculator instead of constructing a new one per request, which re-read the whole vector file from disk on every /cbow POST. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>db693f1 -
Fix Space startup crash: drop device_map="auto" for CPU inference
On HF cpu-basic, accelerate's "auto" device_map split Qwen across devices and marked layers for disk offload. PEFT then failed applying the LoRA adapter over that offload index: KeyError: 'base_model.model.model.model.embed_tokens' which killed the uvicorn import of main.py and put the Space in RUNTIME_ERROR. Load the model whole and move it to the device instead, and use float32 off-GPU since fp16 on CPU is slow with unimplemented ops. Also load the model lazily on first /contentdistillery request, so a model problem can no longer take down captioning and cbow with it, and strip a stray merge-conflict marker from README.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>2f4f0ba
-
Add GitHub Actions cron to keep HF Space awake
Pings the space every 5 minutes to prevent it sleeping on free tier. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1bbb27c -
Pin transformers<5.0.0 to fix torch 2.6.0 incompatibility
transformers 5.x requires torch.float8_e8m0fnu which was added in torch 2.7, causing build failure on HF free tier with torch==2.6.0+cpu. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b49e3bb
-
Updated cbow UI
5ab0e19 -
Trigger rebuild
7ae475d -
UI Enhancements
f66e5e6 -
fixing qwen model loading from HF dataset
b48ecb9 -
moved both cbow and qwen to cache HF dataset
e497915
-
Handled reddit env info. Added back buttons.
d32cb1d
-
Added two more games. Container runs locally
79a071f
-
updated web pages
3aa3d4c -
fix: write uploaded file to /tmp for HF compatibility
405db35 -
Fixed some format error in main.py
623450c -
chore: trigger rebuild
0d739fa -
The alive message is now visible. Switch back to original landing page.
31cc6ff -
revert back to non-lazy one
2b3d156 -
Fixed lazy loading caption_generator
4bf21ae -
fix: set app_port to 7860 to match Docker CMD
54c9e50 -
lazy loading
5f629ed -
Add HEALTHCHECK and app_port
e3a01f4 -
Debugging
dddd691 -
Switch to uvicorn CMD for Hugging Face
1d4698f -
need import of uvicorn
84f04ee -
Add CMD to run main.py
629276e -
Fix: update port to 8000 in main.py
5dafda7 -
Set Docker port to 8000
9682d12 -
Add EXPOSE 8000 to Dockerfile
e4acc16 -
Fix: save CLIPProcessor in Docker build
7d83d86 -
Fix: preload bert tokenizer during Docker build
86103f1 -
fix Dockerfile - load clip-vit-base-patch32 should be after pip install requirements.txt
bbf7f29 -
Fix: preload CLIP model during Docker build
e16e634 -
Fix: force cache to /tmp to avoid permission errors
ee03864 -
HF needs all model downloads to a special read-write cache dir, also affects encoder.py
a6b901d -
using /tmp, should be writable
88b5781 -
removed /data, see if HF can use default internal cache
8c88d40 -
Need to create empty artifacts folder before wget
1017099 -
Dockerfile needs wget
9acc34b -
Moved pth file to HF dataset
ac9c6c1
-
Resolve README.md conflict and merge with remote Hugging Face content
7b2eca8 -
initial commit
Verified signaturedba8761