Spaces:
Runtime error
Runtime error
Ali Asgarov
commited on
Commit
·
69ebf10
1
Parent(s):
f6a92d7
Update app.py
Browse files
app.py
CHANGED
@@ -116,15 +116,15 @@ def plagiarism_check(
|
|
116 |
source_embeddings.append(None)
|
117 |
|
118 |
# Populate matching scores for scrapped pages
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
|
129 |
|
130 |
def compute_cosine_similarity(args):
|
|
|
116 |
source_embeddings.append(None)
|
117 |
|
118 |
# Populate matching scores for scrapped pages
|
119 |
+
for i, soup in enumerate(soups):
|
120 |
+
print(f"Analyzing {i+1} of {len(soups)} soups........................")
|
121 |
+
if soup:
|
122 |
+
page_content = soup.text
|
123 |
+
for j, sent in enumerate(sentences):
|
124 |
+
score = matchingScore(sent, page_content)
|
125 |
+
score = matchingScore(sent, page_content)
|
126 |
+
# score = cos_sim_torch(embed_text(sent), source_embeddings[i])
|
127 |
+
ScoreArray[i][j] = score
|
128 |
|
129 |
|
130 |
def compute_cosine_similarity(args):
|