Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ embeddings_dataset = load_dataset("Vadim212/doctest2")["train"]
|
|
36 |
embeddings_dataset.add_faiss_index(column="embeddings")
|
37 |
|
38 |
def get_html(row):
|
39 |
-
product = f" [{row.product}]" if
|
40 |
-
product_line = f" [{row.product_line}]" if
|
41 |
result = f"""<div style='font-size:16pt'>{row.title} <font style='font-size:10pt'>[{row.origin}]{product_line}{product}</font> </div>
|
42 |
<div style='font-size:8pt'>{row.path}</div>
|
43 |
{html.escape(row.content)}<br><a href='{row.url}' target='_blank'>Link</a>"""
|
|
|
36 |
embeddings_dataset.add_faiss_index(column="embeddings")
|
37 |
|
38 |
def get_html(row):
|
39 |
+
product = f" [{row.product}]" if row.product is not None else ""
|
40 |
+
product_line = f" [{row.product_line}]" if row.product_line is not None else ""
|
41 |
result = f"""<div style='font-size:16pt'>{row.title} <font style='font-size:10pt'>[{row.origin}]{product_line}{product}</font> </div>
|
42 |
<div style='font-size:8pt'>{row.path}</div>
|
43 |
{html.escape(row.content)}<br><a href='{row.url}' target='_blank'>Link</a>"""
|