Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -25,33 +25,33 @@ app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_methods=["*"], all
|
|
| 25 |
DEVICE = torch.device("cpu")
|
| 26 |
|
| 27 |
# ββ Ensemble configs (from optimizer) ββ
|
| 28 |
-
# Using image_ensemble_v2
|
| 29 |
-
#
|
| 30 |
ENSEMBLE_CONFIGS = {
|
| 31 |
"clean": {
|
| 32 |
-
"models": ["image_ensemble_v2"
|
| 33 |
-
"weights": [
|
| 34 |
-
"threshold": 0.
|
| 35 |
},
|
| 36 |
"whatsapp": {
|
| 37 |
"models": ["image_ensemble_v2"],
|
| 38 |
"weights": [1.0],
|
| 39 |
-
"threshold": 0.
|
| 40 |
},
|
| 41 |
"instagram": {
|
| 42 |
-
"models": ["image_ensemble_v2"
|
| 43 |
-
"weights": [
|
| 44 |
-
"threshold": 0.
|
| 45 |
},
|
| 46 |
"telegram": {
|
| 47 |
-
"models": ["image_ensemble_v2"
|
| 48 |
-
"weights": [
|
| 49 |
-
"threshold": 0.
|
| 50 |
},
|
| 51 |
"screenshot": {
|
| 52 |
-
"models": ["image_ensemble_v2"
|
| 53 |
-
"weights": [
|
| 54 |
-
"threshold": 0.
|
| 55 |
}
|
| 56 |
}
|
| 57 |
|
|
|
|
| 25 |
DEVICE = torch.device("cpu")
|
| 26 |
|
| 27 |
# ββ Ensemble configs (from optimizer) ββ
|
| 28 |
+
# Using image_ensemble_v2 only β ai_gen model has class-mapping issues (always predicts fake)
|
| 29 |
+
# Will re-enable ai_gen after retraining/fixing
|
| 30 |
ENSEMBLE_CONFIGS = {
|
| 31 |
"clean": {
|
| 32 |
+
"models": ["image_ensemble_v2"],
|
| 33 |
+
"weights": [1.0],
|
| 34 |
+
"threshold": 0.50
|
| 35 |
},
|
| 36 |
"whatsapp": {
|
| 37 |
"models": ["image_ensemble_v2"],
|
| 38 |
"weights": [1.0],
|
| 39 |
+
"threshold": 0.55
|
| 40 |
},
|
| 41 |
"instagram": {
|
| 42 |
+
"models": ["image_ensemble_v2"],
|
| 43 |
+
"weights": [1.0],
|
| 44 |
+
"threshold": 0.50
|
| 45 |
},
|
| 46 |
"telegram": {
|
| 47 |
+
"models": ["image_ensemble_v2"],
|
| 48 |
+
"weights": [1.0],
|
| 49 |
+
"threshold": 0.50
|
| 50 |
},
|
| 51 |
"screenshot": {
|
| 52 |
+
"models": ["image_ensemble_v2"],
|
| 53 |
+
"weights": [1.0],
|
| 54 |
+
"threshold": 0.50
|
| 55 |
}
|
| 56 |
}
|
| 57 |
|