Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -201,7 +201,7 @@ def block_users(client, threshold, dataset):
|
|
201 |
if "threshold" in user:
|
202 |
# old type of dataset being used, only 'violent' data available
|
203 |
if "Violent" in dataset:
|
204 |
-
if user["threshold"] >= threshold:
|
205 |
|
206 |
user_id = str(user["username"])
|
207 |
if block_user(user_id, user, "Violent - old dataset"):
|
@@ -209,7 +209,7 @@ def block_users(client, threshold, dataset):
|
|
209 |
else:
|
210 |
# modern dataset being used
|
211 |
if "Violent" in dataset:
|
212 |
-
if user["violence-threshold"] >= threshold:
|
213 |
user_id = str(user["username"])
|
214 |
if block_user(user_id, user, "Violent"):
|
215 |
num_users_blocked = num_users_blocked + 1
|
201 |
if "threshold" in user:
|
202 |
# old type of dataset being used, only 'violent' data available
|
203 |
if "Violent" in dataset:
|
204 |
+
if user["threshold"]/2 >= threshold:
|
205 |
|
206 |
user_id = str(user["username"])
|
207 |
if block_user(user_id, user, "Violent - old dataset"):
|
209 |
else:
|
210 |
# modern dataset being used
|
211 |
if "Violent" in dataset:
|
212 |
+
if user["violence-threshold"]/2 >= threshold:
|
213 |
user_id = str(user["username"])
|
214 |
if block_user(user_id, user, "Violent"):
|
215 |
num_users_blocked = num_users_blocked + 1
|