Text Classification
Transformers
Safetensors
English
bert
adverse-drug-events
drug-safety
pharmacovigilance
biomedical
PubMedBERT
text-embeddings-inference
Instructions to use tatonettilab/onsides-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tatonettilab/onsides-bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="tatonettilab/onsides-bert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tatonettilab/onsides-bert") model = AutoModelForSequenceClassification.from_pretrained("tatonettilab/onsides-bert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 308 Bytes
526f371 | 1 2 3 4 5 6 7 8 9 10 11 | from transformers import PretrainedConfig
class OnsidesConfig(PretrainedConfig):
model_type = "onsides"
def __init__(self, classifier_dropout=0.5, num_labels=2, **kwargs):
self.classifier_dropout = classifier_dropout
self.num_labels = num_labels
super().__init__(**kwargs)
|