Downloads · 30 days
12
3% of all-time downloads
Amanpradhan1/health-fact-check-model
health-fact-check-model is a machine learning model from Amanpradhan1. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is based on nbroad/longformer-base-health-fact for health claim fact-checking.
Downloads · 30 days
12
3% of all-time downloads
All-time downloads
379
Public
Parameters
149M
595 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors595 MB · 100%
From the Hugging Face model README
This model is based on nbroad/longformer-base-health-fact for health claim fact-checking.
## Model description
The model uses Longformer architecture to classify health-related claims into three categories:
- True
- False
- Mixture
## Intended uses & limitations
This model is intended for:
- Fact-checking health-related claims
- Initial screening of health information
- Long document health claim verification
## Base Model
This model uses nbroad/longformer-base-health-fact as the base model, which is specifically designed for health fact verification tasks.
The Longformer architecture allows it to process longer sequences efficiently.
## Usage
```python
from transformers import LongformerForSequenceClassification, LongformerTokenizer
model = LongformerForSequenceClassification.from_pretrained("Amanpradhan1/health-fact-check-model")
tokenizer = LongformerTokenizer.from_pretrained("Amanpradhan1/health-fact-check-model")
# Example usage
text = "Regular exercise can help improve cardiovascular health"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=4096)
outputs = model(**inputs)
probabilities = outputs.logits.softmax(dim=-1)
# Map predictions to labels
label_mapping = {0: "False", 1: "Mixture", 2: "True"}
prediction = label_mapping[probabilities.argmax().item()]
confidence = probabilities.max().item()
```
## Model Capabilities
- Handles long documents up to 4096 tokens
- Efficient attention mechanism for long sequences
- Specialized for health domain content
- Pre-trained on health-related datasets