Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
hahahafofo
/
image2text_prompt_generator
like
19
Runtime error
App
Files
Files
Community
9010530
image2text_prompt_generator
/
utils
/
html.py
hahafofo
fix
39fbaa4
over 1 year ago
raw
Copy download link
history
blame
Safe
170 Bytes
import
html
def
plaintext_to_html
(
text
):
text = (
"<p>"
+
"<br>\n"
.join([
f"
{html.escape(x)}
"
for
x
in
text.split(
"\n"
)]) +
"</p>"
)
return
text