tskolm commited on
Commit
3bfacb1
·
1 Parent(s): 39f8228

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -25,9 +25,11 @@ def generate(tokenizer, model, text, features):
25
 
26
  if '<|authornameend|>' not in raw:
27
  continue
28
-
29
- author, text = raw.split('<|authornameend|>')
30
-
 
 
31
  count += 1
32
  st.markdown('**' + author.strip() + '**: ' + text.replace('<|endoftext|>', '').replace('<|pad|>', '').strip())
33
 
 
25
 
26
  if '<|authornameend|>' not in raw:
27
  continue
28
+
29
+ end_name = raw.split('<|authornameend|>')
30
+ author = end_name[-2]
31
+ text = end_name[-1]
32
+
33
  count += 1
34
  st.markdown('**' + author.strip() + '**: ' + text.replace('<|endoftext|>', '').replace('<|pad|>', '').strip())
35