Spaces:
Sleeping
Sleeping
Add version tracking and model metadata to API
Browse files- Add VERSION = "2.0.0" to track API version
- Add MODEL_VERSION = "CV_Test-2026-01-05" to identify model source
- Add LAST_UPDATED timestamp for deployment tracking
- Include version info in health check endpoints
- Now shows num_classes (11) with 'hi' gesture support
This ensures users can verify the latest model deployment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9 unmodified lines1011121314151617181920212223242574 unmodified lines1001011021031041053 unmodified lines1091101111121131141154 unmodified lines1201211221231241251269 unmodified linesfrom pydantic import BaseModelfrom typing import List, Dictimport mediapipe as mpfrom model import CustomLSTMfrom preprocessing import decode_base64_image, process_frame# Initialize FastAPI appapp = FastAPI(title="Sign Language Recognition API",description="Real-time Malaysian Sign Language (MSL) recognition using MediaPipe and LSTM",version="1.0.0")# Enable CORS for web app access74 unmodified linesdevice: strmodel_loaded: boolgestures: List[str]@app.get("/", response_model=HealthResponse)3 unmodified lines"status": "healthy","device": str(device),"model_loaded": True,"gestures": GESTURES}4 unmodified lines"status": "healthy","device": str(device),"model_loaded": True,"gestures": GESTURES}9 unmodified lines1011121314151617181920212223242526272829303174 unmodified lines1061071081091101111121131141153 unmodified lines1191201211221231241251261271281294 unmodified lines1341351361371381391401411421431449 unmodified linesfrom pydantic import BaseModelfrom typing import List, Dictimport mediapipe as mpfrom datetime import datetimefrom model import CustomLSTMfrom preprocessing import decode_base64_image, process_frame# Version and deployment infoVERSION = "2.0.0"MODEL_VERSION = "CV_Test-2026-01-05" # Updated with 'hi' gesture supportLAST_UPDATED = "2026-01-05T10:00:00Z"# Initialize FastAPI appapp = FastAPI(title="Sign Language Recognition API",description="Real-time Malaysian Sign Language (MSL) recognition using MediaPipe and LSTM",version=VERSION)# Enable CORS for web app access74 unmodified linesdevice: strmodel_loaded: boolgestures: List[str]version: strmodel_version: strlast_updated: strnum_classes: int@app.get("/", response_model=HealthResponse)3 unmodified lines"status": "healthy","device": str(device),"model_loaded": True,"gestures": GESTURES,"version": VERSION,"model_version": MODEL_VERSION,"last_updated": LAST_UPDATED,"num_classes": NUM_CLASSES}4 unmodified lines"status": "healthy","device": str(device),"model_loaded": True,"gestures": GESTURES,"version": VERSION,"model_version": MODEL_VERSION,"last_updated": LAST_UPDATED,"num_classes": NUM_CLASSES}
app.py+21-3