Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def generate_fakypedia(article_title: str):
|
|
39 |
result += f"# Fakypedia results for \"{article_title}\" \n"
|
40 |
for i, sample_output in enumerate(sample_outputs):
|
41 |
decoded_output = tokenizer.decode(sample_output, skip_special_tokens=True)
|
42 |
-
decoded_output = decoded_output.replace(f"\%{article_title}", f"## {article_title}").replace("\%", " ").replace("\\n", " \n")
|
43 |
decoded_output = decoded_output.replace("## \n", "\n")
|
44 |
result += "{}\n".format(decoded_output)
|
45 |
return result
|
|
|
39 |
result += f"# Fakypedia results for \"{article_title}\" \n"
|
40 |
for i, sample_output in enumerate(sample_outputs):
|
41 |
decoded_output = tokenizer.decode(sample_output, skip_special_tokens=True)
|
42 |
+
decoded_output = decoded_output.replace(f"\%{article_title}", f"## {i+1}. {article_title}").replace("\%", " ").replace("\\n", " \n")
|
43 |
decoded_output = decoded_output.replace("## \n", "\n")
|
44 |
result += "{}\n".format(decoded_output)
|
45 |
return result
|