Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def find_similar_texts(model_name, input_text):
|
|
46 |
sorted_embeddings = text_embeddings.sort_values(by='euclidean_distance', ascending=True)
|
47 |
top_five = sorted_embeddings.head(5)[['abstract', 'patent no', 'title']]
|
48 |
# formatted_output = '\n\n'.join([f"Patent No: {row['patent no']}\n {row['title']}\n {row['abstract']}\n" for index, row in top_five.iterrows()])
|
49 |
-
formatted_output = '\n\n'.join([f"Patent No: {row['patent no']}\
|
50 |
return formatted_output
|
51 |
else:
|
52 |
return "It seems there is no patent abstract close to your description."
|
|
|
46 |
sorted_embeddings = text_embeddings.sort_values(by='euclidean_distance', ascending=True)
|
47 |
top_five = sorted_embeddings.head(5)[['abstract', 'patent no', 'title']]
|
48 |
# formatted_output = '\n\n'.join([f"Patent No: {row['patent no']}\n {row['title']}\n {row['abstract']}\n" for index, row in top_five.iterrows()])
|
49 |
+
formatted_output = '\n\n'.join([f"<strong>Patent No: {row['patent no']}\n<strong>Title: {row['title']}\n<strong>Abstract: {row['abstract']}" for index, row in top_five.iterrows()])
|
50 |
return formatted_output
|
51 |
else:
|
52 |
return "It seems there is no patent abstract close to your description."
|