Skip to content

Commit

Permalink
Merge pull request #260 from EricFillion/ef/2-3-1
Browse files Browse the repository at this point in the history
New Version: 2.3.1
  • Loading branch information
EricFillion committed Sep 11, 2021
2 parents 2768f7f + 5482381 commit 68ef679
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/pages/1-text-generation/3-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GENSettings() contains the fields shown in Table 1.0
| bad_words | None | List of words/phrases that cannot be generated. |


#### Examples 1.2:
#### Example 1.2:

```python
from happytransformer import HappyGeneration, GENSettings
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
setup(
name = 'happytransformer',
packages = find_packages(),
version = '2.3.0',
version = '2.3.1',
license='Apache 2.0',
description = "Happy Transformer is an API built on top of Hugging Face's Transformer library that makes it easy to utilize state-of-the-art NLP models.",
long_description= readme,
Expand Down
3 changes: 2 additions & 1 deletion tests/test_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def test_default_min_max_length():
def test_bad_words():
happy_gen = HappyGeneration()
# Test single words
args_test_word_single = GENSettings(bad_words=["new","tool"])
args_test_word_single = GENSettings(bad_words=["new", "tool"])
# result without bad_words:  "a new field of research that has been gaining momentum"
output_single = happy_gen.generate_text("Artificial intelligence is ", args=args_test_word_single)
output_words_single = output_single.text.split()
for phrase in args_test_word_single.bad_words:
Expand Down

0 comments on commit 68ef679

Please sign in to comment.