Spaces:
Paused
Paused
fix style
Browse files
app.py
CHANGED
@@ -109,12 +109,21 @@ def process_exact_match_payload(payload, query):
|
|
109 |
text = result["text"]
|
110 |
print(result, text, type(text))
|
111 |
meta_html = format_meta(result)
|
112 |
-
|
113 |
query_start = text.find(query)
|
114 |
query_end = query_start + len(query)
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
results_html += result_html
|
119 |
return results_html + "<hr>"
|
120 |
|
|
|
109 |
text = result["text"]
|
110 |
print(result, text, type(text))
|
111 |
meta_html = format_meta(result)
|
112 |
+
|
113 |
query_start = text.find(query)
|
114 |
query_end = query_start + len(query)
|
115 |
+
tokens_html = text[0:query_start]
|
116 |
+
tokens_html += "<b>{}</b>".format(text[query_start:query_end])
|
117 |
+
tokens_html += text[query_end:]
|
118 |
+
result_html = (
|
119 |
+
meta_html
|
120 |
+
+ """
|
121 |
+
<p style='font-family: Arial;'>{}</p>
|
122 |
+
<br>
|
123 |
+
""".format(
|
124 |
+
tokens_html
|
125 |
+
)
|
126 |
+
)
|
127 |
results_html += result_html
|
128 |
return results_html + "<hr>"
|
129 |
|