From bdf25f206e8bd2822978b5b0596352b78a947045 Mon Sep 17 00:00:00 2001 From: Max Woolf Date: Sat, 5 May 2018 12:49:42 -0700 Subject: [PATCH] v1.2.2: change byline, pass is_csv downstream --- setup.py | 6 +++--- textgenrnn/textgenrnn.py | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 3889708..24f25d2 100644 --- a/setup.py +++ b/setup.py @@ -25,9 +25,9 @@ setup( name='textgenrnn', packages=['textgenrnn'], # this must be the same as the name above - version='1.2.1', - description='Pretrained character-based neural network for ' \ - 'easily generating text.', + version='1.2.2', + description='Easily train your own text-generating neural network' \ + 'of any size and complexity', long_description=long_description, long_description_content_type='text/markdown', author='Max Woolf', diff --git a/textgenrnn/textgenrnn.py b/textgenrnn/textgenrnn.py index 5810726..9111b2e 100644 --- a/textgenrnn/textgenrnn.py +++ b/textgenrnn/textgenrnn.py @@ -256,14 +256,16 @@ def reset(self): self.__init__(name=self.config['name']) def train_from_file(self, file_path, header=True, delim="\n", - new_model=False, context=None, **kwargs): + new_model=False, context=None, + is_csv=False, **kwargs): context_labels = None if context: texts, context_labels = textgenrnn_texts_from_file_context( file_path) else: - texts = textgenrnn_texts_from_file(file_path, header, delim) + texts = textgenrnn_texts_from_file(file_path, header, + delim, is_csv) print("{:,} texts collected.".format(len(texts))) if new_model: