Download mindxtrain/ui/__init__.py from PYTHAI/mindXtrain: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/PYTHAI/mindXtrain/resolve/main/mindxtrain/ui/__init__.py
- Command line
-
hf download hf://PYTHAI/mindXtrain/mindxtrain/ui/__init__.py
-
curl -L -o __init__.py https://huggingface.co/PYTHAI/mindXtrain/resolve/main/mindxtrain/ui/__init__.py
1.27 kB
| """mindxtrain.ui — the framework as one Gradio surface (Basic · Advanced · Scientific). | |
| from mindxtrain.ui import build, main | |
| main(port=7862) # or: mindxtrain ui | |
| `build`, `main` and `VERSION` live in `.app`, which imports gradio — the optional `ui` | |
| extra. They resolve lazily (PEP 562) so the stdlib-only members of this package stay | |
| importable on a base install, the way the rest of the framework is: `console` and | |
| `reasoning` hold no heavy imports, and `parse_log` reads a training log with nothing but | |
| the standard library. A box that cannot spare gradio can still parse a log and talk to | |
| the daemon. | |
| """ | |
| from __future__ import annotations | |
| from typing import Any | |
| from .metrics import RunMetrics, parse_log | |
| # Resolved from `.app` on first access; each needs gradio installed. | |
| _APP_EXPORTS = frozenset({"VERSION", "build", "main"}) | |
| __all__ = ["VERSION", "RunMetrics", "build", "main", "parse_log"] | |
| def __getattr__(name: str) -> Any: | |
| """Import the Gradio-backed exports on first use (PEP 562).""" | |
| if name in _APP_EXPORTS: | |
| from . import app | |
| return getattr(app, name) | |
| raise AttributeError(f"module {__name__!r} has no attribute {name!r}") | |
| def __dir__() -> list[str]: | |
| return sorted(__all__) | |