apiagrilens / src /app.py

Commit History

Fix indentation errors in retry and partial load paths to resolve runtime IndentationError
e1b81f0

Sidoineko commited on

Direct load: force explicit cache_dir to HF_HOME (/home/user/.cache/huggingface) to avoid /data permissions
9b0e41a

Sidoineko commited on

Add multiple loading approaches: direct HF Hub, /app/cache, /tmp/hf_home, /tmp/model_repo - to handle permission issues
7d8defe

Sidoineko commited on

Force local-only model loading: always snapshot to /tmp/model_repo; remove direct HF cache loads; redirect HF cache to /tmp; disable TRANSFORMERS_CACHE
a754003

Sidoineko commited on

Fix infinite loops and multiple processes: add rate limiting, cooldowns, and proper cleanup to prevent system overload
4c6302b

Sidoineko commited on

Add complete automated recovery system: auto-detect partial loads, stuck states, and recover automatically without manual intervention
5d18e68

Sidoineko commited on

Add partial load recovery method and endpoint to handle interrupted model loading
a02cc5c

Sidoineko commited on

Add robust multiprocessing startup and persistent state management to handle Hugging Face Spaces interruptions
d841385

Sidoineko commited on

Fix model ID to google/gemma-3n-E4B-it and optimize loading strategy: try cache first, then snapshot as fallback
cf8e6a2

Sidoineko commited on

Add persistent model loader and retry mechanism to handle Hugging Face Spaces interruptions
9534306

Sidoineko commited on

Fix indentation issues and add robust middleware for model loading to prevent CancelledError
a84214d

Sidoineko commited on

Fix startup warmup: use threading instead of asyncio to prevent CancelledError during model loading
1c9e2cf

Sidoineko commited on

API hardening: auto-fallback HF_HOME to /tmp when unwritable; disable hf_transfer if missing
eda4143

Sidoineko commited on

Fix model loading with better error handling and memory management
86532db

Sidoineko commited on

API: snapshot_download + local_files_only + warmup; robust retries for model load
6e9e3e0

Sidoineko commited on

Fix: Optimize FastAPI for Hugging Face Spaces - Force CPU mode, add logging, fix Dockerfile
5c88d83

Sidoineko commited on

Fix: multimodal inference with apply_chat_template + image preprocessing; align with Streamlit app
151f468

Sidoineko commited on

Update FastAPI to work with Streamlit model cache - API now detects when Streamlit has loaded the model and can share model information
a5debd6

Sidoineko commited on

Add supervisord + Dockerfile for Streamlit+FastAPI; ignore .env
d7dbf7e

Sidoineko commited on

Update src/app.py
6583266

sido1991 commited on

Update src/app.py
c68b85c

sido1991 commited on

Move app to src/, update FastAPI app and endpoints
5fa04c7

Sidoineko commited on