gguf.py 478 B

123456789101112131415
  1. # This file left for compatibility. If you want to use the GGUF API from Python
  2. # then don't import gguf/gguf.py directly. If you're looking for examples, see the
  3. # examples/ directory for gguf-py
  4. import importlib
  5. import sys
  6. from pathlib import Path
  7. sys.path.insert(0, str(Path(__file__).parent.parent))
  8. # Compatibility for people trying to import gguf/gguf.py directly instead of as a package.
  9. importlib.invalidate_caches()
  10. import gguf # noqa: E402
  11. importlib.reload(gguf)