Instructions to use IEETA/BioNExt-Extractor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IEETA/BioNExt-Extractor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="IEETA/BioNExt-Extractor", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("IEETA/BioNExt-Extractor", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_bionextextractor.py from IEETA/BioNExt-Extractor: direct link, hf CLI and curl.
- Browser
- Download file 722 Bytes
-
https://huggingface.co/IEETA/BioNExt-Extractor/resolve/main/configuration_bionextextractor.py
- Command line
-
hf download hf://IEETA/BioNExt-Extractor/configuration_bionextextractor.py
-
curl -L -o configuration_bionextextractor.py https://huggingface.co/IEETA/BioNExt-Extractor/resolve/main/configuration_bionextextractor.py
722 Bytes
| from transformers import PretrainedConfig, AutoConfig | |
| from typing import List | |
| class BioNExtExtractorConfig(PretrainedConfig): | |
| model_type = "relation-novelty-extractor" | |
| def __init__( | |
| self, | |
| arch_type = "mha", | |
| index_type = "both", | |
| novel = True, | |
| tokenizer_special_tokens = ['[s1]','[e1]', '[s2]','[e2]' ], | |
| update_vocab = None, | |
| version="0.1.1", | |
| **kwargs, | |
| ): | |
| self.version = version | |
| self.arch_type = arch_type | |
| self.index_type = index_type | |
| self.novel = novel | |
| self.tokenizer_special_tokens = tokenizer_special_tokens | |
| self.update_vocab = update_vocab | |
| super().__init__(**kwargs) | |