Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,9 @@ def preprocess_text(text):
|
|
39 |
return ' '.join(tokens)
|
40 |
|
41 |
# Prepare the data for prediction
|
42 |
-
data['processed_text'] = data[['CV/Resume'
|
43 |
-
data_open['processed_text_open'] = data_open[['Demo_F', 'Question'
|
44 |
-
data_open['processed_text_mopen'] = data_open[['Demo_M', 'Question'
|
45 |
|
46 |
labels = ["Peacemaker", "Loyalist", "Achiever", "Reformer", "Individualist", "Helper", "Challenger", "Investigator", "Enthusiast"]
|
47 |
|
|
|
39 |
return ' '.join(tokens)
|
40 |
|
41 |
# Prepare the data for prediction
|
42 |
+
data['processed_text'] = data[['CV/Resume'] + [f'Q{i}' for i in range(1, 37)]].agg(lambda x: ', '.join(x), axis=1).apply(preprocess_text)
|
43 |
+
data_open['processed_text_open'] = data_open[['Demo_F', 'Question']].agg(' '.join, axis=1).apply(preprocess_text)
|
44 |
+
data_open['processed_text_mopen'] = data_open[['Demo_M', 'Question']].agg(' '.join, axis=1).apply(preprocess_text)
|
45 |
|
46 |
labels = ["Peacemaker", "Loyalist", "Achiever", "Reformer", "Individualist", "Helper", "Challenger", "Investigator", "Enthusiast"]
|
47 |
|