CoolFace
Modelpublic

mempooltx/bert-base-fallacy-detection

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes8downloads
README.md49 linesDownload Raw Back to root
1---2license: mit3pipeline_tag: text-classification4widget:5 - text: "The city faces a critical decision with only two paths ahead. We can either drastically cut funding for our public libraries or completely eliminate the weekend public transportation service. Choosing to save the libraries means depriving many citizens of essential transportation during weekends. On the other hand, if we maintain the transportation service, our libraries, the cornerstone of our community's education, will suffer greatly. This decision is crucial because cutting library funds doesn't just reduce book availability; it sets us on a slippery slope. Once we start cutting library funds, what's next? Perhaps we'll begin to cut funding for schools, then public safety, leading eventually to the deterioration of all public services. Similarly, if we stop weekend buses and trains, it won't just affect weekend travel. This decision could lead to a complete shutdown of our public transportation system, stranding the elderly and the young, and crippling our city's mobility. Therefore, we are at a crossroads where we must choose between the intellectual growth of our community and its physical mobility. Remember, a decision to prioritize one is not just a simple budget cut; it's the first step towards an eventual collapse of the other. We are, sadly, in a situation where supporting one essential service inevitably leads to the downfall of another."6 - text: "The sky is blue because the sky is blue"7 - text: "Experts agree that the science is sound"8 - text: "Everybody exercises so you should too"9 - text: "All dogs are dumb because they cannot talk"10---11 12 13```python14from transformers import AutoModelForSequenceClassification, AutoTokenizer15import torch16import torch.nn.functional as F17 18# Load the model and tokenizer19model = AutoModelForSequenceClassification.from_pretrained("mempooltx/bert-base-fallacy-detection")20tokenizer = AutoTokenizer.from_pretrained("mempooltx/bert-base-fallacy-detection")21 22# Prepare the text23text = "the sky is blue because the sky is blue"24inputs = tokenizer(text, padding=True, truncation=True, return_tensors="pt")25 26# Get predictions27model.eval()28with torch.no_grad():29    outputs = model(**inputs)30 31# Convert logits to probabilities32probabilities = F.softmax(outputs.logits, dim=1)33```34 35| Label  | Description            |36|--------|------------------------|37| 0      | false causality        |38| 1      | circular reasoning     |39| 2      | fallacy of relevance   |40| 3      | intentional            |41| 4      | fallacy of credibility |42| 5      | faulty generalization  |43| 6      | equivocation           |44| 7      | ad hominem             |45| 8      | appeal to emotion      |46| 9      | fallacy of extension   |47| 10     | false dilemma          |48| 11     | fallacy of logic       |49| 12     | ad populum             |