Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,12 @@ from typing import List, Dict, Any
|
|
10 |
|
11 |
# Define categories with sub-level information
|
12 |
CATEGORIES = {
|
13 |
-
'hateful': ['
|
14 |
'insults': ['insults'],
|
15 |
-
'sexual': ['
|
16 |
'physical_violence': ['physical_violence'],
|
17 |
-
'self_harm': ['
|
18 |
-
'all_other_misconduct': ['
|
19 |
}
|
20 |
|
21 |
def get_embeddings(texts: List[str], model: str = "text-embedding-3-large") -> np.ndarray:
|
|
|
10 |
|
11 |
# Define categories with sub-level information
|
12 |
CATEGORIES = {
|
13 |
+
'hateful': ['hateful_lvl_1_discriminatory', 'hateful_lvl_2_hate_speech'],
|
14 |
'insults': ['insults'],
|
15 |
+
'sexual': ['sexual_lvl_1_not_appropriate_for_minors', 'sexual_lvl_2_not_appropriate_for_all'],
|
16 |
'physical_violence': ['physical_violence'],
|
17 |
+
'self_harm': ['self_harm_lvl_1_intent', 'self_harm_lvl_2_action'],
|
18 |
+
'all_other_misconduct': ['all_other_misconduct_lvl_1_not_socially_accepted', 'all_other_misconduct_lvl_2_illegal']
|
19 |
}
|
20 |
|
21 |
def get_embeddings(texts: List[str], model: str = "text-embedding-3-large") -> np.ndarray:
|