Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
api.py
CHANGED
|
@@ -84,10 +84,12 @@ async def analyze_video_endpoint(
|
|
| 84 |
# Format clean JSON response for the Flutter app
|
| 85 |
raw_prob = result.get("deception_probability", 0.5)
|
| 86 |
|
| 87 |
-
#
|
| 88 |
-
# This shifts 0.
|
| 89 |
-
boosted_prob = float(pow(raw_prob, 0.
|
| 90 |
-
|
|
|
|
|
|
|
| 91 |
|
| 92 |
response_data = {
|
| 93 |
"status": "success",
|
|
|
|
| 84 |
# Format clean JSON response for the Flutter app
|
| 85 |
raw_prob = result.get("deception_probability", 0.5)
|
| 86 |
|
| 87 |
+
# PARANOID BOOST: Apply an aggressive power curve (p^0.3)
|
| 88 |
+
# This shifts 0.1 -> 0.5 (making it deceptive) and 0.03 -> 0.35
|
| 89 |
+
boosted_prob = float(pow(raw_prob, 0.3))
|
| 90 |
+
|
| 91 |
+
# Lower the verdict threshold to 0.35 for high sensitivity
|
| 92 |
+
verdict = "deceptive" if boosted_prob >= 0.35 else "truthful"
|
| 93 |
|
| 94 |
response_data = {
|
| 95 |
"status": "success",
|