Instructions to use wesin/chemprot-pubmedbert-relation-extraction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wesin/chemprot-pubmedbert-relation-extraction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="wesin/chemprot-pubmedbert-relation-extraction")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("wesin/chemprot-pubmedbert-relation-extraction") model = AutoModelForSequenceClassification.from_pretrained("wesin/chemprot-pubmedbert-relation-extraction", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "labels": [ | |
| "Upregulator", | |
| "Downregulator", | |
| "Agonist", | |
| "Antagonist", | |
| "Substrate", | |
| "NO_RELATION" | |
| ], | |
| "label2id": { | |
| "Upregulator": 0, | |
| "Downregulator": 1, | |
| "Agonist": 2, | |
| "Antagonist": 3, | |
| "Substrate": 4, | |
| "NO_RELATION": 5 | |
| }, | |
| "id2label": { | |
| "0": "Upregulator", | |
| "1": "Downregulator", | |
| "2": "Agonist", | |
| "3": "Antagonist", | |
| "4": "Substrate", | |
| "5": "NO_RELATION" | |
| } | |
| } |