Spaces:
Running
Running
Commit
·
bfb44d5
1
Parent(s):
1fdb912
Remove async from generate_post_html and adjust image generation call
Browse files- post_blog.py +2 -2
post_blog.py
CHANGED
@@ -40,12 +40,12 @@ def generate_image(title, summary, category):
|
|
40 |
return f"data:image/png;base64,{image}"
|
41 |
return image_url
|
42 |
|
43 |
-
|
44 |
title = title.replace("{", r"{{").replace("}", r"}}")
|
45 |
summary = summary.replace("{", r"{{").replace("}", r"}}")
|
46 |
mindmap = mindmap.replace("{", r"{{").replace("}", r"}}")
|
47 |
citation = citation.replace("{", r"{{").replace("}", r"}}")
|
48 |
-
image =
|
49 |
html_summary = mistune.html(summary)
|
50 |
post = f"""
|
51 |
<div>
|
|
|
40 |
return f"data:image/png;base64,{image}"
|
41 |
return image_url
|
42 |
|
43 |
+
def generate_post_html(title, summary, mindmap, category, citation):
|
44 |
title = title.replace("{", r"{{").replace("}", r"}}")
|
45 |
summary = summary.replace("{", r"{{").replace("}", r"}}")
|
46 |
mindmap = mindmap.replace("{", r"{{").replace("}", r"}}")
|
47 |
citation = citation.replace("{", r"{{").replace("}", r"}}")
|
48 |
+
image = generate_image(title, summary, category)
|
49 |
html_summary = mistune.html(summary)
|
50 |
post = f"""
|
51 |
<div>
|