Spaces:
Sleeping
Sleeping
hackerbyhobby
commited on
updated requirements and added apt.txt
Browse files
app.py
CHANGED
|
@@ -33,13 +33,13 @@ def boost_probabilities(probabilities: dict, text: str) -> dict:
|
|
| 33 |
other_scam_keyword_count = sum(1 for kw in OTHER_SCAM_KEYWORDS if kw in lower_text)
|
| 34 |
|
| 35 |
# Base boosts
|
| 36 |
-
smishing_boost = 0.
|
| 37 |
-
other_scam_boost = 0.
|
| 38 |
|
| 39 |
# Check URLs => +0.20 only to Smishing
|
| 40 |
found_urls = re.findall(r"(https?://[^\s]+)", lower_text)
|
| 41 |
if found_urls:
|
| 42 |
-
smishing_boost += 0.
|
| 43 |
|
| 44 |
# Extract original probabilities
|
| 45 |
p_smishing = probabilities["SMiShing"]
|
|
|
|
| 33 |
other_scam_keyword_count = sum(1 for kw in OTHER_SCAM_KEYWORDS if kw in lower_text)
|
| 34 |
|
| 35 |
# Base boosts
|
| 36 |
+
smishing_boost = 0.30 * smishing_keyword_count
|
| 37 |
+
other_scam_boost = 0.30 * other_scam_keyword_count
|
| 38 |
|
| 39 |
# Check URLs => +0.20 only to Smishing
|
| 40 |
found_urls = re.findall(r"(https?://[^\s]+)", lower_text)
|
| 41 |
if found_urls:
|
| 42 |
+
smishing_boost += 0.35
|
| 43 |
|
| 44 |
# Extract original probabilities
|
| 45 |
p_smishing = probabilities["SMiShing"]
|