Spaces:
Runtime error
Runtime error
Fix api error
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def decode(paragraphs_needed):
|
|
111 |
return contexts
|
112 |
|
113 |
def split_article(article, trigger):
|
114 |
-
if article.split("\n"): article = article.replace("\n", "
|
115 |
paragraphs = article.replace("\\c\\c", "\c\c").split("\\\\c\\\\c")
|
116 |
format_pars = [par for par in paragraphs]
|
117 |
pars = [str(par) + " -- " + str(trigger) for par in paragraphs]
|
|
|
111 |
return contexts
|
112 |
|
113 |
def split_article(article, trigger):
|
114 |
+
if article.split("\n ") > article.split("\\c\\c"): article = article.replace("\n ", "\\c\\c")
|
115 |
paragraphs = article.replace("\\c\\c", "\c\c").split("\\\\c\\\\c")
|
116 |
format_pars = [par for par in paragraphs]
|
117 |
pars = [str(par) + " -- " + str(trigger) for par in paragraphs]
|