Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,8 @@ def validate_images(img_url_1, img_url_2, img_url_3, domain: str, title: str, th
|
|
22 |
domain_text = domain.replace("_", " ").lower()
|
23 |
if title == "":
|
24 |
title = None
|
25 |
-
|
|
|
26 |
valid_images = [x for i, x in enumerate(images) if valid_probas[i].squeeze() >= threshold]
|
27 |
invalid_images = [x for i, x in enumerate(images) if valid_probas[i].squeeze() < threshold]
|
28 |
return f"## Domain: {domain}", valid_images, invalid_images
|
|
|
22 |
domain_text = domain.replace("_", " ").lower()
|
23 |
if title == "":
|
24 |
title = None
|
25 |
+
images, output = detector.predict_probas_url(img_urls, domain_text, site, title)
|
26 |
+
probas, valid_probas, invalid_probas = output
|
27 |
valid_images = [x for i, x in enumerate(images) if valid_probas[i].squeeze() >= threshold]
|
28 |
invalid_images = [x for i, x in enumerate(images) if valid_probas[i].squeeze() < threshold]
|
29 |
return f"## Domain: {domain}", valid_images, invalid_images
|