Update app.py
Browse files
app.py
CHANGED
@@ -47,12 +47,12 @@ def find_similar_texts(model_name, input_text):
|
|
47 |
top_five = sorted_embeddings.head(5)[['abstract', 'patent no', 'title']]
|
48 |
# formatted_output = '\n\n'.join([f"<Patent No: {row['patent no']}\nTitle: {row['title']}\nAbstract: {row['abstract']}" for index, row in top_five.iterrows()])
|
49 |
formatted_output = '<br><br>'.join([
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
])
|
55 |
-
|
56 |
return formatted_output
|
57 |
else:
|
58 |
return "It seems there is no patent abstract close to your description."
|
|
|
47 |
top_five = sorted_embeddings.head(5)[['abstract', 'patent no', 'title']]
|
48 |
# formatted_output = '\n\n'.join([f"<Patent No: {row['patent no']}\nTitle: {row['title']}\nAbstract: {row['abstract']}" for index, row in top_five.iterrows()])
|
49 |
formatted_output = '<br><br>'.join([
|
50 |
+
f"<strong>Patent No:</strong> {row['patent no']}<br>"
|
51 |
+
f"<strong>Title:</strong> {row['title']}<br>"
|
52 |
+
f"<strong>Abstract:</strong> {row['abstract']}<br>"
|
53 |
+
for index, row in top_five.iterrows()
|
54 |
+
])
|
55 |
+
|
56 |
return formatted_output
|
57 |
else:
|
58 |
return "It seems there is no patent abstract close to your description."
|