Spaces:
Running
Running
Update score adjustment.
Browse files
app.py
CHANGED
@@ -89,10 +89,10 @@ def predict(model: InputModel) -> OutputModel:
|
|
89 |
|
90 |
if re.search(commercial_sender_pattern, sender):
|
91 |
print("commercial sender")
|
92 |
-
score = score
|
93 |
if re.search(commercial_stop_pattern, text):
|
94 |
print("STOP founded")
|
95 |
-
score = score
|
96 |
commercial_stop = True
|
97 |
else:
|
98 |
print("STOP missing")
|
@@ -127,10 +127,10 @@ def predict(model: InputModel) -> OutputModel:
|
|
127 |
score = 1.0
|
128 |
break
|
129 |
elif overall.get('score') < 0:
|
130 |
-
score = score
|
131 |
else:
|
132 |
print(f"no URL found")
|
133 |
-
score = score
|
134 |
|
135 |
print(f"final score {score}")
|
136 |
action = ActionModel.NONE
|
|
|
89 |
|
90 |
if re.search(commercial_sender_pattern, sender):
|
91 |
print("commercial sender")
|
92 |
+
score = score * 0.9
|
93 |
if re.search(commercial_stop_pattern, text):
|
94 |
print("STOP founded")
|
95 |
+
score = score * 0.9
|
96 |
commercial_stop = True
|
97 |
else:
|
98 |
print("STOP missing")
|
|
|
127 |
score = 1.0
|
128 |
break
|
129 |
elif overall.get('score') < 0:
|
130 |
+
score = score * 0.9
|
131 |
else:
|
132 |
print(f"no URL found")
|
133 |
+
score = score * 0.9
|
134 |
|
135 |
print(f"final score {score}")
|
136 |
action = ActionModel.NONE
|