Spaces:
Runtime error
Runtime error
Amirizaniani
commited on
Commit
•
25b3581
1
Parent(s):
73ad984
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def calculate_similarity(word, other_words, model, threshold=0.5):
|
|
60 |
return None, None
|
61 |
|
62 |
|
63 |
-
def highlight_similar_paragraphs_with_colors(paragraphs, similarity_threshold=0.
|
64 |
model = SentenceTransformer('all-MiniLM-L6-v2')
|
65 |
|
66 |
# Split each paragraph into sentences
|
@@ -195,7 +195,7 @@ def setTextVisibility(cbg, model_name_input):
|
|
195 |
|
196 |
# Apply highlighting to all processed sentences, receiving one complete HTML string.
|
197 |
highlighted_html = []
|
198 |
-
highlighted_html = highlight_similar_paragraphs_with_colors(sentences, similarity_threshold=0.
|
199 |
|
200 |
|
201 |
result = []
|
|
|
60 |
return None, None
|
61 |
|
62 |
|
63 |
+
def highlight_similar_paragraphs_with_colors(paragraphs, similarity_threshold=0.75):
|
64 |
model = SentenceTransformer('all-MiniLM-L6-v2')
|
65 |
|
66 |
# Split each paragraph into sentences
|
|
|
195 |
|
196 |
# Apply highlighting to all processed sentences, receiving one complete HTML string.
|
197 |
highlighted_html = []
|
198 |
+
highlighted_html = highlight_similar_paragraphs_with_colors(sentences, similarity_threshold=0.75)
|
199 |
|
200 |
|
201 |
result = []
|