Download api/routes/debug.py from lhc-lab/AI-Colab: direct link, hf CLI and curl.
- Browser
- Download file 607 Bytes
-
https://huggingface.co/datasets/lhc-lab/AI-Colab/resolve/main/api/routes/debug.py
- Command line
-
hf download hf://datasets/lhc-lab/AI-Colab/api/routes/debug.py
-
curl -L -o debug.py https://huggingface.co/datasets/lhc-lab/AI-Colab/resolve/main/api/routes/debug.py
607 Bytes
| from quart import Blueprint, jsonify | |
| from datetime import datetime | |
| import logging | |
| from core.model_management import ModelManager | |
| debug_bp = Blueprint('debug_bp', __name__) | |
| logger = logging.getLogger(__name__) | |
| async def get_gpu_status(): | |
| """Получение статуса GPU""" | |
| logger.info("[API] Received request for GPU status.") | |
| manager = ModelManager() | |
| status = manager.get_gpu_status() | |
| return jsonify({ | |
| "success": True, | |
| "gpu_status": status, | |
| "timestamp": datetime.now().isoformat() | |
| }) | |