Update to show 30 abstracts
Browse files
app.py
CHANGED
@@ -83,7 +83,7 @@ def create_metadata_html(metadata_dict):
|
|
83 |
|
84 |
def search(query, boolean_terms, sy, ey,limit2_pwc):
|
85 |
|
86 |
-
k=
|
87 |
|
88 |
question_embedding = model.encode(query)
|
89 |
scores, retrieved_examples = ds['train'].get_nearest_examples('embeddings', question_embedding, k=100)
|
@@ -95,7 +95,7 @@ def search(query, boolean_terms, sy, ey,limit2_pwc):
|
|
95 |
divs=[create_metadata_html(r) for r in results[0]]
|
96 |
divs.reverse()
|
97 |
|
98 |
-
html="<br><br><pre><strong>Articles with Repo:</strong> {} <strong>Articles in date range:</strong> {} <strong>Articles meeting boolean terms:</strong> {}</pre><br><strong>Top
|
99 |
return html
|
100 |
|
101 |
|
|
|
83 |
|
84 |
def search(query, boolean_terms, sy, ey,limit2_pwc):
|
85 |
|
86 |
+
k=30
|
87 |
|
88 |
question_embedding = model.encode(query)
|
89 |
scores, retrieved_examples = ds['train'].get_nearest_examples('embeddings', question_embedding, k=100)
|
|
|
95 |
divs=[create_metadata_html(r) for r in results[0]]
|
96 |
divs.reverse()
|
97 |
|
98 |
+
html="<br><br><pre><strong>Articles with Repo:</strong> {} <strong>Articles in date range:</strong> {} <strong>Articles meeting boolean terms:</strong> {}</pre><br><strong>Top 30 results returned<strong><br>".format(str(results[1]),str(results[2]),str(results[3]))+"<br>".join(divs)
|
99 |
return html
|
100 |
|
101 |
|