at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 huggingface-hub, 11 onnxruntime, 12 sentencepiece, 13 torch, 14 tqdm, 15 transformers, 16}: 17 18buildPythonPackage rec { 19 pname = "gliner"; 20 version = "0.2.21"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "urchade"; 25 repo = "GLiNER"; 26 tag = version; 27 hash = "sha256-v8Q/+et9yWeVSWt1K9Ahg3I4dz5/Ft+o1ueNOSaGEOU="; 28 }; 29 30 build-system = [ 31 setuptools 32 ]; 33 34 dependencies = [ 35 huggingface-hub 36 onnxruntime 37 sentencepiece 38 torch 39 tqdm 40 transformers 41 ]; 42 43 pythonImportsCheck = [ "gliner" ]; 44 45 # All tests require internet 46 doCheck = false; 47 48 meta = { 49 description = "Generalist and Lightweight Model for Named Entity Recognition"; 50 homepage = "https://github.com/urchade/GLiNER"; 51 changelog = "https://github.com/urchade/GLiNER/releases/tag/${src.tag}"; 52 license = lib.licenses.asl20; 53 maintainers = with lib.maintainers; [ GaetanLepage ]; 54 badPlatforms = [ 55 # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' 56 # Attempt to use DefaultLogger but none has been registered. 57 "aarch64-linux" 58 ]; 59 }; 60}