Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,11 @@ def generate(tokenizer, model, text, features):
|
|
25 |
|
26 |
if '<|authornameend|>' not in raw:
|
27 |
continue
|
28 |
-
|
29 |
-
|
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 |
|