Giter VIP home page Giter VIP logo

political_classifier's Introduction

Political Classifier

A fine-tuned RoBERTa model for classifying text as either political (1) or non-political (0).

MODEL USAGE:

  • Download the pretrained model, unzip it, and place the folder in the saved_models/ directory
  • Install requirements using pip install -r requirements.txt (I would recommend creating a virtual environment before doing so)
  • Your input data needs to be a csv with a text column and the model can then generate predictions for it-- a sample data file is included in the repository as sample_data.csv
  • To generate predictions (if your dataset is named sample_data.csv, otherwise change accordingly), run the following command inside the main directory: python test_model.py -m saved_models/pol_clf_checkpoint -d sample_data.csv
  • You should now have a predictions.csv file with a classifier output column named prediction
  • If you need the checkpoint files please reach out by email to anshumanc[at]usf[dot]edu.

TRAINING DATA:

CITATION:

If you use our model/data, please cite the following papers:

  • Plain-text:

    Askari, H., Chhabra, A., von Hohenberg, B. C., Heseltine, M., & Wojcieszak, M. (2024). Incentivizing News Consumption on Social Media Platforms Using Large Language Models and Realistic Bot Accounts. arXiv preprint arXiv:2403.13362.

  • Bib:

    title={Incentivizing News Consumption on Social Media Platforms Using Large Language Models and Realistic Bot Accounts},
    author={Askari, Hadi and Chhabra, Anshuman and von Hohenberg, Bernhard Clemm and Heseltine, Michael and Wojcieszak, Magdalena},
    journal={arXiv preprint arXiv:2403.13362},
    year={2024}}
    

political_classifier's People

Contributors

anshuman23 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.