Instructions to use Dzeniks/roberta-fact-check with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dzeniks/roberta-fact-check with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Dzeniks/roberta-fact-check")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Dzeniks/roberta-fact-check") model = AutoModelForSequenceClassification.from_pretrained("Dzeniks/roberta-fact-check", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md (#2)
Browse files- Update README.md (87df53c645a1612c3b79fd545deb57c6ac29c738)
Co-authored-by: Sameer Ahmed <SameerAhmed-7@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -41,7 +41,7 @@ model.eval()
|
|
| 41 |
with torch.no_grad():
|
| 42 |
prediction = model(**x)
|
| 43 |
|
| 44 |
-
label = torch.argmax(
|
| 45 |
|
| 46 |
print(f"Label: {label}")
|
| 47 |
```
|
|
|
|
| 41 |
with torch.no_grad():
|
| 42 |
prediction = model(**x)
|
| 43 |
|
| 44 |
+
label = torch.argmax(prediction[0]).item()
|
| 45 |
|
| 46 |
print(f"Label: {label}")
|
| 47 |
```
|