Spaces:
Sleeping
Sleeping
change to 0.85 threshold fixed for pillar 2
Browse files
main.py
CHANGED
|
@@ -314,8 +314,11 @@ async def analyze_artworks(file_a: UploadFile = File(...), file_b: UploadFile =
|
|
| 314 |
correspondence_map_b64 = fig_to_base64(corr_fig)
|
| 315 |
|
| 316 |
n_patches_a = a2b_best.shape[0]
|
| 317 |
-
|
| 318 |
-
|
|
|
|
|
|
|
|
|
|
| 319 |
pct_copied = round((high_a / n_patches_a) * 100, 1)
|
| 320 |
|
| 321 |
# --- PILLAR 3: Substantial Similarity ---
|
|
|
|
| 314 |
correspondence_map_b64 = fig_to_base64(corr_fig)
|
| 315 |
|
| 316 |
n_patches_a = a2b_best.shape[0]
|
| 317 |
+
|
| 318 |
+
_patches_a = a2b_best.shape[0]
|
| 319 |
+
LITERAL_COPY_THRESH = 0.85
|
| 320 |
+
high_a = (a2b_best > LITERAL_COPY_THRESH).sum().item()
|
| 321 |
+
|
| 322 |
pct_copied = round((high_a / n_patches_a) * 100, 1)
|
| 323 |
|
| 324 |
# --- PILLAR 3: Substantial Similarity ---
|