Spotlight is a web app that allows researchers present their text classifiers in a web application without any web development required. Researchers implement their text classifiers in Python, and load it into the web app via a plugin model.
Spotlight supports:
- Uploading test datasets to be re-used
- Creating new text classifier models via training and downloading them for further use
- Testing text classifier models
- Interactive demo mode for users to input new test cases
- Create your classifier that implements the
IClassifier
interface for predict, train and pre_process. See IClassifier.py for documentation, and other sample files included in the classifiers folder. - Copy your classifier into the classifiers folder.
- Add a MyClassifier.yapsy-plugin file to describe your classifier.
- When you start Spotlight, the classifier will automatically be loaded for testing and training. Enjoy!
Note: To ensure that the same libraries are available on the server as well as your local development environment, use the Pipfile included to ensure all packages are available. Run pipenv shell
to obtain an environment that mimicks the server.
Pre-requisites:
- Python 3.X
- npm
To initialize and obtain all required package dependencies:
- Backend
Run the following commands:
pip install pipenv
pipenv install
- Frontend
cd www
npm install
To run a local server:
- Start the backend Flask server.
pipenv run python app.py
- Start the frontend Angular server in a separate window.
cd www
ng serve
- Open a browser and the server will be running on http://localhost:4200/.