Spaces:
Sleeping
Sleeping
Update model_comparison.py
Browse files- model_comparison.py +10 -10
model_comparison.py
CHANGED
@@ -41,18 +41,18 @@ TASK_EVAL_DATABASE_PATH = 'data/task_oriented_eval_database.yaml'
|
|
41 |
# st.write("NEW EVAL ID:", newEvalID)
|
42 |
# return newEvalID
|
43 |
|
44 |
-
def check_profanity(df):
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
|
54 |
def dataframe_with_selections(df):
|
55 |
-
df_with_selections = check_profanity(df.copy())
|
56 |
df_with_selections.insert(0, "Select", True)
|
57 |
|
58 |
# Get dataframe row-selections from user with st.data_editor
|
|
|
41 |
# st.write("NEW EVAL ID:", newEvalID)
|
42 |
# return newEvalID
|
43 |
|
44 |
+
# def check_profanity(df):
|
45 |
+
# cleanedDF = df
|
46 |
+
# for i, row in cleanedDF.iterrows():
|
47 |
+
# if predict([row['User']])[0] != 0.0:
|
48 |
+
# cleanedDF.at[i, 'User'] = '**NSFW**'
|
49 |
+
# if 'Target' in df:
|
50 |
+
# if predict([row['Target']])[0] != 0.0:
|
51 |
+
# cleanedDF.at[i, 'Target'] = '**NSFW**'
|
52 |
+
# return cleanedDF
|
53 |
|
54 |
def dataframe_with_selections(df):
|
55 |
+
# df_with_selections = check_profanity(df.copy())
|
56 |
df_with_selections.insert(0, "Select", True)
|
57 |
|
58 |
# Get dataframe row-selections from user with st.data_editor
|