Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def format_results(results, query):
|
|
| 31 |
text_content = results[TEXT_FIELD]
|
| 32 |
query_words = query.split()
|
| 33 |
for word in query_words:
|
| 34 |
-
text_content = [text.replace(word, f"<b>{word}</b>") for text in text_content]
|
| 35 |
return "\n".join([result_html(result, meta) for result,meta in zip(text_content, results[METADATA_FIELD])])
|
| 36 |
|
| 37 |
def page_0(query):
|
|
|
|
| 31 |
text_content = results[TEXT_FIELD]
|
| 32 |
query_words = query.split()
|
| 33 |
for word in query_words:
|
| 34 |
+
text_content = [text.replace(word, f"<b style=\"color:#2a5cb3;font-weight: 700\">{word}</b>") for text in text_content]
|
| 35 |
return "\n".join([result_html(result, meta) for result,meta in zip(text_content, results[METADATA_FIELD])])
|
| 36 |
|
| 37 |
def page_0(query):
|