Spaces:
Running
Running
Commit
·
c375a6f
1
Parent(s):
a577ee6
updates
Browse files
vouchervision/OCR_google_cloud_vision.py
CHANGED
|
@@ -832,9 +832,11 @@ class SafetyCheck():
|
|
| 832 |
print(f"racy: {likelihood_name[safe.racy]}")
|
| 833 |
|
| 834 |
# Check the levels of adult, violence, racy, etc. content.
|
| 835 |
-
if (safe.adult >
|
| 836 |
-
safe.
|
| 837 |
-
safe.
|
|
|
|
|
|
|
| 838 |
print("Found violation")
|
| 839 |
return True # The image violates safe search guidelines.
|
| 840 |
|
|
|
|
| 832 |
print(f"racy: {likelihood_name[safe.racy]}")
|
| 833 |
|
| 834 |
# Check the levels of adult, violence, racy, etc. content.
|
| 835 |
+
if (safe.adult > 2 or
|
| 836 |
+
safe.medical > 2 or
|
| 837 |
+
safe.spoofed > 2 or
|
| 838 |
+
safe.violence > 2 or
|
| 839 |
+
safe.racy > 2):
|
| 840 |
print("Found violation")
|
| 841 |
return True # The image violates safe search guidelines.
|
| 842 |
|