Download nemotron-ocr/src/nemotron_ocr_cpp/__init__.py from Metausermac13/nemotron-ocr-v2: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/Metausermac13/nemotron-ocr-v2/resolve/main/nemotron-ocr/src/nemotron_ocr_cpp/__init__.py
- Command line
-
hf download hf://Metausermac13/nemotron-ocr-v2/nemotron-ocr/src/nemotron_ocr_cpp/__init__.py
-
curl -L -o __init__.py https://huggingface.co/Metausermac13/nemotron-ocr-v2/resolve/main/nemotron-ocr/src/nemotron_ocr_cpp/__init__.py
415 Bytes
| # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| import importlib | |
| # Ensure torch is imported so its shared libs (e.g., libc10.so) are available | |
| try: | |
| import torch # noqa: F401 | |
| except Exception: # torch may be cpu-only/cuda-only, still attempt import of extension | |
| pass | |
| from ._nemotron_ocr_cpp import * # noqa: F403 |