To process summaries written in the iScore interface, we use the Hugging Face Transformers API to download transformer models and run a Python Flask server that recieves summaries from the interface, runs the models, and sends the processed data back to the interface.
The first time you run main.py
you will download NLTK packages and the Hugging Face Transformers models. This may take a while depending on your internet download speed.
- The NLTK packages will take up around 100MB of space.
- The Hugging Face transformers will take up around 4GB of space.
tiedaar/longformer-content-global
is ~0.6GB.tiedaar/longformer-wording-global
is ~0.6GB.tiedaar/summary-longformer-content
is ~0.6GB.tiedaar/summary-longformer-wording
is ~0.6GB.bloomberg/KeyBART
is ~1.5GB.
Please install Python v3.9.x
on your computer first (latest release)
- Open a command-line shell (Windows) or Terminal (MacOS, Linux) in a new window
- Navigate to this folder (
server/
)
Windows:
- Run
py -3.9 -m venv venv
- Run
.\venv\Scripts\activate
MacOS / Linux:
- Run
python3.9 -m venv venv
- Run
source venv/bin/activate
Both:
- Run
python -m pip install -r requirements.txt
- Install symspellpy
v6.7.7
(instructions)- symspellpy is a Python port of SymSpell
v6.7.1
- Warning for MacOS users
NOTE: symspellpy has only been tested on Windows and Linux systems and is assumed to work on macOS.
- symspellpy is a Python port of SymSpell
- Install PyTorch
v2.0.x
(instructions)- PyTorch is installed separately because some systems may support CUDA, which requires a different installation process and can significantly speed up the tool.
- First, check if your GPU can support CUDA (link)
- Then, follow the instructions linked above to determine if your system can support CUDA for computation.
- Run
python main.py
- Flask
v2.3.x
- Flask-CORS
v3.0.x
- NLTK
v3.8.x
- NumPy
v1.24.x
- orjson
v3.8.x
- pandas
v2.0.x
- PyTorch
v2.0.x
with CUDAv11.8
- symspellpy
v6.7.7
, a Python port of SymSpellv6.7.1
- Transformers
v2.1.x