|
|
--- |
|
|
language: en |
|
|
license: mit |
|
|
tags: |
|
|
- health |
|
|
- trigger-detection |
|
|
- transformers |
|
|
- xlm-roberta |
|
|
datasets: |
|
|
- memo-dataset |
|
|
base_model: xlm-roberta-base |
|
|
library_name: transformers |
|
|
pipeline_tag: text-classification |
|
|
model_name: xlmr-trigger-detection |
|
|
widget: |
|
|
- text: "Patient developed a severe allergic reaction after injection." |
|
|
- text: "No trigger event was recorded." |
|
|
--- |
|
|
|
|
|
# XLM-R Trigger Detection |
|
|
|
|
|
This model fine-tunes [XLM-RoBERTa-base](https://huggingface.co/xlm-roberta-base) |
|
|
for **trigger classification** in health-related text (from the Memo Dataset). |
|
|
|
|
|
## Model Details |
|
|
- **Architecture:** XLM-RoBERTa-base |
|
|
- **Task:** Binary classification (Trigger / Non-Trigger) |
|
|
- **Trained on:** Memo Dataset |
|
|
- **Framework:** Transformers (Transformers + PyTorch) |
|
|
|
|
|
## Example Usage |
|
|
```python |
|
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification |
|
|
|
|
|
tokenizer = AutoTokenizer.from_pretrained("Tanvi0212/xlmr-trigger-detection") |
|
|
model = AutoModelForSequenceClassification.from_pretrained("Tanvi0212/xlmr-trigger-detection") |
|
|
|
|
|
text = "Patient developed a severe allergic reaction." |
|
|
inputs = tokenizer(text, return_tensors="pt") |
|
|
outputs = model(**inputs) |
|
|
|