Skip to content

Commit

Permalink
Add setup.py. Minor README change.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessevig committed May 6, 2021
1 parent 43bea48 commit 5dec834
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ model_view(
)
```

You may select `Encoder`, `Decoder`, or `Cross` attention from the drop-down in the upper left corner.

### Running a sample notebook

```
Expand Down Expand Up @@ -220,7 +222,7 @@ head_view(attention, tokens, layer=2, heads=[3,5])

You may also pre-select a specific `layer` and single `head` for the neuron view.

#### Dark/light mode
#### Dark / light mode

The model view and neuron view support dark (default) and light modes. You may turn off dark mode in these views using
the `display_mode` parameter:
Expand Down
23 changes: 23 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import pathlib
from setuptools import setup

# The directory containing this file
HERE = pathlib.Path(__file__).parent

# The text of the README file
README = (HERE / "README.md").read_text()

# This call to setup() does all the work
setup(
name="bertviz",
version="1.1.0",
description="Attention visualization tool for NLP Transformer models.",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/jessevig/bertviz",
author="Jesse Vig",
license="Apache 2.0",
packages=["bertviz"],
include_package_data=True,
install_requires=["transformers>=2.0", "torch>=1.0", "tqdm", "boto3", "requests", "regex", "sentencepiece"],
)

0 comments on commit 5dec834

Please sign in to comment.