readme: ---
  license: mit
  ---
  ### Dataset used 
  [Fake and real news dataset](https://www.kaggle.com/datasets/clmentbisaillon/fake-and-real-news-dataset)
  
  ### Labels
  Fake news: 1 </br>
  Real news: 0 
  
  ### Usage 
  ```python
  from transformers import AutoModelForSequenceClassification, AutoTokenizer, AutoConfig
  import torch
  
  config = AutoConfig.from_pretrained("bhavitvyamalik/fake-news_xtremedistil-l6-h256-uncased")
  model = AutoModelForSequenceClassification.from_pretrained("bhavitvyamalik/fake-news_xtremedistil-l6-h256-uncased", config=config)
  tokenizer = AutoTokenizer.from_pretrained("microsoft/xtremedistil-l6-h256-uncased", usefast=True)
  
  text = "According to reports by Fox News, Biden is the President of the USA"
  encode = tokenizer(text, max_length=512, truncation=True, padding="max_length", return_tensors="pt")
  
  output = model(**encode)
  print(torch.argmax(output["logits"]))
  ```
  
  ### Performance on test data 
  ```json
  'test/accuracy': 0.9977836608886719,
  'test/aucroc': 0.9999998807907104,
  'test/f1': 0.9976308941841125,
  'test/loss': 0.00828308891505003
  ```
  
  ### Run can be tracked here
  [Wandb project for Fake news classifier](https://wandb.ai/bhavitvya/Fake%20news%20classifier?workspace=user-bhavitvya)