Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,14 +29,13 @@ def convert_to_markdown(input_text):
|
|
29 |
|
30 |
# Split into title and content based on the first ":", handling extra whitespace
|
31 |
title, content = map(str.strip, input_text.split(":", 1))
|
32 |
-
|
33 |
# Bold the keywords
|
34 |
for word in bold_words:
|
35 |
content = content.replace(word, f'\n**{word}**\n')
|
36 |
-
content = content.replace(f'
|
37 |
|
38 |
# Construct the Markdown output with headings
|
39 |
-
formatted_output = f"**
|
40 |
|
41 |
return formatted_output.strip()
|
42 |
|
|
|
29 |
|
30 |
# Split into title and content based on the first ":", handling extra whitespace
|
31 |
title, content = map(str.strip, input_text.split(":", 1))
|
|
|
32 |
# Bold the keywords
|
33 |
for word in bold_words:
|
34 |
content = content.replace(word, f'\n**{word}**\n')
|
35 |
+
# content = content.replace(f'** ', f' ')
|
36 |
|
37 |
# Construct the Markdown output with headings
|
38 |
+
formatted_output = f"**{title}{content}"
|
39 |
|
40 |
return formatted_output.strip()
|
41 |
|