Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 1.56 KB

README.md

File metadata and controls

42 lines (36 loc) · 1.56 KB

InfoPattern

This demo is built based on streamlit.

To run the demo, make sure the repo is on the demo branch.

git branch
# * demo
#   main

Follow steps below in SwitchingLM/demo/.

1. Prepare the checkpoint and dependencies

The checkpoint can be downloaded here: (Russia | LeftRight) and should be placed under ckpt/. By default, the Russia checkpoint should be used.

mkdir ckpt
mv <YOUR_DOWNLOADED_CKPT> ckpt

To install dependencies, install pytorch, transformers, and streamlit at the official websites, or simply through package management tools such as pip.

pip install torch
pip install transformers
pip install streamlit
pip install st-annotated-text
pip install nltk
pip install accelerate
pip install graphviz

Prepare the punkt functionality

python -c "import nltk; nltk.download('punkt')"

2. Run the application

Once the checkpoint and the dependencies are prepared, run

streamlit run Home.py

3. Navigate between the tabs and explore different functionalities

Check out our slides for the functionalities!