Spaces:
Paused
Paused
Commit History
-
FIX: Add get_position_at_t alias to HelixGeometry
jkbennitt9f6ae17 -
FIX: Resolve 7 critical HF Spaces deployment issues for production readiness
jkbennitt +1: ClaudeWHY: Deployment failures caused by duplicate code, missing dependencies, Python version incompatibility, oversized models exceeding ZeroGPU memory limits, async event loop conflicts, and metadata inconsistencies. WHAT: 1. **CRITICAL: Remove duplicate main() function** (app.py) - Deleted lines 1336-1437 (duplicate main, health_check, get_system_info) - Kept comprehensive first definition with error handling 2. **CRITICAL: Add missing psutil dependency** (requirements.txt) - app.py imports psutil but it wasn't in requirements - Would cause ModuleNotFoundError on HF Spaces 3. **Add Python version specification** (.python-version) - Created file specifying Python 3.10 for HF Spaces compatibility - Local dev uses 3.13.2, HF Spaces runs 3.10.13 4. **Fix async event loop conflicts** (huggingface_client.py:355) - Check for existing loop before creating new one - Prevents RuntimeError in Gradio async contexts 5. **Optimize models for ZeroGPU constraints** (huggingfa…8d60b1e -
FIX: Remove @spaces.GPU decorator from async method to fix NotImplementedError
jkbennitt +1: ClaudeWHY: HuggingFace Spaces ZeroGPU decorator (@spaces.GPU) doesn't support async methods and raises NotImplementedError when applied to async functions. The _zerogpu_inference method is async (uses await internally) and was causing startup crashes. WHAT: - Removed @spaces.GPU decorator from _zerogpu_inference async method - Method remains async to support await calls to _load_model_to_gpu and _cleanup_gpu_memory - GPU operations still work natively through PyTorch CUDA without decorator EXPECTED: - Application starts without NotImplementedError - ZeroGPU inference works through native PyTorch CUDA acceleration - Async operations continue functioning correctly ALTERNATIVES CONSIDERED: - Create sync wrapper: Would require rewriting internal await logic - Make method synchronous: Can't do - uses await for model loading/cleanup - Use asyncio.run(): Would block event loop in async context TESTS: - Verified @spaces.GPU only supports sync functions in Spaces SDK - Confirmed PyTorch CUDA oper…6f7d7da -
Clean hf-space branch and prepare for HuggingFace Spaces deployment
jkbennittfb867c3