Spaces:
Sleeping
Sleeping
Update routes.py
Browse files
routes.py
CHANGED
|
@@ -4,7 +4,7 @@ from datetime import datetime
|
|
| 4 |
import torch
|
| 5 |
import model_loader
|
| 6 |
import os
|
| 7 |
-
from rule_based_filter import
|
| 8 |
|
| 9 |
|
| 10 |
# Optional Supabase logging
|
|
@@ -54,7 +54,7 @@ def check_text(payload: TextRequest):
|
|
| 54 |
|
| 55 |
# Decide which texts go to model
|
| 56 |
for text in payload.texts:
|
| 57 |
-
if
|
| 58 |
results.append({"blur": True, "score": 1.0}) # High confidence
|
| 59 |
else:
|
| 60 |
to_predict.append(text)
|
|
|
|
| 4 |
import torch
|
| 5 |
import model_loader
|
| 6 |
import os
|
| 7 |
+
from rule_based_filter import debug_rule_based_check
|
| 8 |
|
| 9 |
|
| 10 |
# Optional Supabase logging
|
|
|
|
| 54 |
|
| 55 |
# Decide which texts go to model
|
| 56 |
for text in payload.texts:
|
| 57 |
+
if debug_rule_based_check(text):
|
| 58 |
results.append({"blur": True, "score": 1.0}) # High confidence
|
| 59 |
else:
|
| 60 |
to_predict.append(text)
|