Skip to content

Commit

Permalink
change init file
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayballal95 committed Nov 11, 2024
1 parent 8b28553 commit e45b111
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions python/python/embed_anything/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,12 @@
import glob

path = os.path.dirname(onnxruntime.__file__) + "/capi/"
dylib_path = glob.glob(os.path.join(path, "libonnxruntime.so*"))

if os.environ.get("ORT_DYLIB_PATH") is None:
if path is None:
print("onnxruntime is not installed. Install it using `pip install onnxruntime`")

else:
dylib_path = glob.glob(os.path.join(path, "libonnxruntime.so*"))
os.environ["ORT_DYLIB_PATH"] = dylib_path[0]

__doc__ = _embed_anything.__doc__
Expand Down

0 comments on commit e45b111

Please sign in to comment.