project for hackbeanpot
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Hackbeanpot 2k18 Project


We approached this hackathon project by considering how the API could be used to compare opposing viewpoints on various divisive topics. Ultimately, we decided to use’s “Custom Collections” feature, which allowed us to train a model on for/against arguments from, as well as various other sources. This let us input text to predict whether it was for or against a given argument.

Tech stack:

  • Python
  • Flask
  • API
  • Sass, jQuery



Starting a local server:

  1. Clone the repo
  2. Add a file to the project directory and set a secret key for CSRF as follows:
app.config["SECRET_KEY"] = <your key>
  1. Get an API key and add it to your home directory in an .indicorc file as explained in the docs.
  2. Install dependencies with pip install -r requirements.txt
  3. cd into the project repo and run python
  4. In the browser, open http://localhost:5000/predict

How to use:

  1. Select topic from dropdown menu
  2. Enter text passage to predict in input, then select "Submit" button
  3. Once page has finished reloading, open "Analyze" tab to view prediction

Add additional information to train models:

POST /collect/text
Request body format:

  "text": string,
  "label": string,
  "tag": string

Text: passage of text to train model on
Label: name of model to train, eg: gun_control, climate_change
Tag: pro or con