You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,23 @@ Kubernetes by Google’s Bern
56
56
```
57
57
58
58
You can also train a new model, with support for word level embeddings and bidirectional RNN layers by adding `new_model=True` to any train function.
59
+
60
+
### Interactive mode
61
+
It's also possible to get involved in how the output unfolds, step by step. Interactive mode will suggest you the *top N* options for the next char/word, and allows you to pick one.
62
+
63
+
Just pass `interactive=True` and `top=N`. N defaults to 3.
59
64
65
+
```python
66
+
from textgenrnn import textgenrnn
67
+
68
+
textgen = textgenrnn()
69
+
textgen.generate(interactive=True, top_n=5)
70
+
```
71
+
72
+

73
+
74
+
This can add a *human touch* to the output; it feels like you're the writer! ([reference](https://fivethirtyeight.com/features/some-like-it-bot/))
75
+
60
76
## Usage
61
77
62
78
textgenrnn can be installed [from pypi](https://pypi.python.org/pypi/textgenrnn) via `pip`:
@@ -107,8 +123,6 @@ Additionally, the retraining is done with a momentum-based optimizer and a linea
107
123
108
124
* A way to visualize the attention-layer outputs to see how the network "learns."
109
125
110
-
* Supervised text generation mode: allow the model to present the top *n* options and user select the next char/word ([reference](https://fivethirtyeight.com/features/some-like-it-bot/))
111
-
112
126
* A mode to allow the model architecture to be used for chatbot conversations (may be released as a separate project)
0 commit comments