Spaces:
Running
v0.10.10 (#33)
Browse files- Summary (f6125144e9df803bac37023b6854f03c30d62a31)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (2f050c06a94348ba17660fdf0dd257a7a30f2f9a)
- Summary (8f52d543a1de5a77b59164e6f4f721696fc64299)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (fffa0062f0da04563ce8cd5b8c7e70e3ae783833)
- Summary (1717e06c53138f3eaf52e38f984035d5fbbceac5)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (cd90a1620005039e6998ca3d0ab34fe3bfe1f2dc)
- Summary (98c66eeb6760ebd60d0a4ae4d9d0ac8f896a59df)
- Update config.toml (91d9d7ef4e540930919833c79607c51fc294d60d)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (e6358979bef7df974cdd6c63aca029c57ac62af8)
- Summary (6de61f5802c0e3640047369ad08ecab73b331d34)
- Update config.toml (b5ed9ffe1ad1d0f500f794adbdaf154836c4f98b)
- Summary (32a92bfceec53fd471bc976cbb849fd9d927ad83)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (da47ac2a7b54d4ff7a69c19e9a2c785464ca5016)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (a38174b5323e173d29898a3d3914e1fff4956b23)
- Summary (fe195552c3857fb5eb2edd95cb44bc2702b5d340)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (1c886618681448e721a7e6daec1c567743446d5d)
- Summary (d02f294f9243051ee718760d8a7206211a67c88e)
- Summary (506641f920e1fe10df73fcf2b8c84b6425851043)
- Merge branch 'main' of https://huggingface.co/spaces/ElenaRyumina/OCEANAI (78abcea91c2e552c225ed682431fe5b907286949)
- Update config.toml (0ddcb6cb1fc8641b7d406eaab09b7000811aaef9)
Co-authored-by: Dmitry Ryumin <DmitryRyumin@users.noreply.huggingface.co>
- app.py +2 -2
- app/event_handlers/calculate_practical_tasks.py +75 -23
- app/event_handlers/practical_subtasks.py +8 -1
- config.toml +2 -1
- practical_tasks_en.yaml +1 -0
- practical_tasks_ru.yaml +1 -0
@@ -93,6 +93,6 @@ if __name__ == "__main__":
|
|
93 |
|
94 |
create_gradio_app().queue(api_open=False).launch(
|
95 |
share=False,
|
96 |
-
server_name=
|
97 |
-
server_port=
|
98 |
)
|
|
|
93 |
|
94 |
create_gradio_app().queue(api_open=False).launch(
|
95 |
share=False,
|
96 |
+
server_name=config_data.AppSettings_SERVER_NAME,
|
97 |
+
server_port=config_data.AppSettings_PORT,
|
98 |
)
|
@@ -662,37 +662,89 @@ def event_handler_calculate_practical_task_blocks(
|
|
662 |
elif (
|
663 |
practical_subtasks.lower() == "finding a suitable junior colleague"
|
664 |
or practical_subtasks.lower() == "finding a suitable senior colleague"
|
|
|
|
|
665 |
):
|
666 |
-
|
667 |
-
config_data.Links_FINDING_COLLEAGUE, ["ID"]
|
668 |
-
)
|
669 |
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
],
|
680 |
-
colleague=colleague_type(practical_subtasks),
|
681 |
-
equal_coefficients=equal_coefficient,
|
682 |
-
out=False,
|
683 |
-
)
|
684 |
|
685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
|
687 |
-
|
688 |
|
689 |
-
|
690 |
-
|
691 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
692 |
|
693 |
df_hidden.reset_index(inplace=True)
|
694 |
|
695 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
|
697 |
person_metadata = create_person_metadata(person_id, files, video_metadata)
|
698 |
|
|
|
662 |
elif (
|
663 |
practical_subtasks.lower() == "finding a suitable junior colleague"
|
664 |
or practical_subtasks.lower() == "finding a suitable senior colleague"
|
665 |
+
or practical_subtasks.lower()
|
666 |
+
== "finding a suitable colleague by personality types"
|
667 |
):
|
668 |
+
pt_scores_copy = pt_scores.iloc[:, 1:].copy()
|
|
|
|
|
669 |
|
670 |
+
preprocess_scores_df(pt_scores_copy, config_data.Dataframes_PT_SCORES[0][0])
|
671 |
+
|
672 |
+
if (
|
673 |
+
practical_subtasks.lower()
|
674 |
+
!= "finding a suitable colleague by personality types"
|
675 |
+
):
|
676 |
+
df_correlation_coefficients = read_csv_file(
|
677 |
+
config_data.Links_FINDING_COLLEAGUE, ["ID"]
|
678 |
+
)
|
|
|
|
|
|
|
|
|
|
|
679 |
|
680 |
+
b5._colleague_ranking(
|
681 |
+
df_files=pt_scores_copy,
|
682 |
+
correlation_coefficients=df_correlation_coefficients,
|
683 |
+
target_scores=[
|
684 |
+
target_score_ope,
|
685 |
+
target_score_con,
|
686 |
+
target_score_ext,
|
687 |
+
target_score_agr,
|
688 |
+
target_score_nneu,
|
689 |
+
],
|
690 |
+
colleague=colleague_type(practical_subtasks),
|
691 |
+
equal_coefficients=equal_coefficient,
|
692 |
+
out=False,
|
693 |
+
)
|
694 |
+
df = apply_rounding_and_rename_columns(b5.df_files_colleague_)
|
695 |
|
696 |
+
df_hidden = df.drop(columns=config_data.Settings_SHORT_PROFESSIONAL_SKILLS)
|
697 |
|
698 |
+
df_hidden.to_csv(
|
699 |
+
colleague_type(practical_subtasks)
|
700 |
+
+ config_data.Filenames_COLLEAGUE_RANKING
|
701 |
+
)
|
702 |
+
else:
|
703 |
+
b5._colleague_personality_type_match(
|
704 |
+
df_files=pt_scores_copy,
|
705 |
+
correlation_coefficients=None,
|
706 |
+
target_scores=[
|
707 |
+
target_score_ope,
|
708 |
+
target_score_con,
|
709 |
+
target_score_ext,
|
710 |
+
target_score_agr,
|
711 |
+
target_score_nneu,
|
712 |
+
],
|
713 |
+
threshold=equal_coefficient,
|
714 |
+
out=False,
|
715 |
+
)
|
716 |
+
df = b5.df_files_MBTI_colleague_match_.rename(
|
717 |
+
columns={
|
718 |
+
"MBTI": "Personality Type",
|
719 |
+
"MBTI_Score": "Personality Type Score",
|
720 |
+
}
|
721 |
+
)
|
722 |
+
|
723 |
+
df_hidden = df[["Path", "Personality Type", "Match"]]
|
724 |
+
|
725 |
+
df_hidden.to_csv(config_data.Filenames_COLLEAGUE_RANKING)
|
726 |
|
727 |
df_hidden.reset_index(inplace=True)
|
728 |
|
729 |
+
if (
|
730 |
+
practical_subtasks.lower()
|
731 |
+
!= "finding a suitable colleague by personality types"
|
732 |
+
):
|
733 |
+
person_id = (
|
734 |
+
int(
|
735 |
+
df_hidden.iloc[
|
736 |
+
(
|
737 |
+
0
|
738 |
+
if practical_subtasks.lower()
|
739 |
+
!= "finding a suitable colleague by personality types"
|
740 |
+
else 1
|
741 |
+
)
|
742 |
+
][config_data.Dataframes_PT_SCORES[0][0]]
|
743 |
+
)
|
744 |
+
- 1
|
745 |
+
)
|
746 |
+
else:
|
747 |
+
person_id = 0
|
748 |
|
749 |
person_metadata = create_person_metadata(person_id, files, video_metadata)
|
750 |
|
@@ -219,6 +219,8 @@ def event_handler_practical_subtasks(
|
|
219 |
elif (
|
220 |
practical_subtasks.lower() == "finding a suitable junior colleague"
|
221 |
or practical_subtasks.lower() == "finding a suitable senior colleague"
|
|
|
|
|
222 |
):
|
223 |
return (
|
224 |
practical_subtasks_selected,
|
@@ -297,7 +299,12 @@ def event_handler_practical_subtasks(
|
|
297 |
minimum=0.0,
|
298 |
maximum=1.0,
|
299 |
step=0.01,
|
300 |
-
label=
|
|
|
|
|
|
|
|
|
|
|
301 |
info=config_data.InformationMessages_VALUE_FROM_TO_INFO.format(0, 1.0),
|
302 |
show_label=True,
|
303 |
interactive=True,
|
|
|
219 |
elif (
|
220 |
practical_subtasks.lower() == "finding a suitable junior colleague"
|
221 |
or practical_subtasks.lower() == "finding a suitable senior colleague"
|
222 |
+
or practical_subtasks.lower()
|
223 |
+
== "finding a suitable colleague by personality types"
|
224 |
):
|
225 |
return (
|
226 |
practical_subtasks_selected,
|
|
|
299 |
minimum=0.0,
|
300 |
maximum=1.0,
|
301 |
step=0.01,
|
302 |
+
label=(
|
303 |
+
config_data.Labels_THRESHOLD_TARGET_SCORE_LABEL
|
304 |
+
if practical_subtasks.lower()
|
305 |
+
== "finding a suitable colleague by personality types"
|
306 |
+
else config_data.Labels_EQUAL_COEFFICIENT_LABEL
|
307 |
+
),
|
308 |
info=config_data.InformationMessages_VALUE_FROM_TO_INFO.format(0, 1.0),
|
309 |
show_label=True,
|
310 |
interactive=True,
|
@@ -1,5 +1,5 @@
|
|
1 |
[AppSettings]
|
2 |
-
APP_VERSION = "0.10.
|
3 |
SERVER_NAME = "127.0.0.1"
|
4 |
PORT = 7860
|
5 |
CSS_PATH = "app.css"
|
@@ -72,6 +72,7 @@ TARGET_SCORE_EXT_LABEL = "Extraversion target score"
|
|
72 |
TARGET_SCORE_AGR_LABEL = "Agreeableness target score"
|
73 |
TARGET_SCORE_NNEU_LABEL = "Non-Neuroticism target score"
|
74 |
EQUAL_COEFFICIENT_LABEL = "Equal coefficient"
|
|
|
75 |
NUMBER_PRIORITY_LABEL = "Priority number"
|
76 |
NUMBER_IMPORTANCE_TRAITS_LABEL = "Importance traits number"
|
77 |
NUMBER_IMPORTANCE_OPE_LABEL = "Openness weight"
|
|
|
1 |
[AppSettings]
|
2 |
+
APP_VERSION = "0.10.10"
|
3 |
SERVER_NAME = "127.0.0.1"
|
4 |
PORT = 7860
|
5 |
CSS_PATH = "app.css"
|
|
|
72 |
TARGET_SCORE_AGR_LABEL = "Agreeableness target score"
|
73 |
TARGET_SCORE_NNEU_LABEL = "Non-Neuroticism target score"
|
74 |
EQUAL_COEFFICIENT_LABEL = "Equal coefficient"
|
75 |
+
THRESHOLD_TARGET_SCORE_LABEL = "Polarity traits threshold"
|
76 |
NUMBER_PRIORITY_LABEL = "Priority number"
|
77 |
NUMBER_IMPORTANCE_TRAITS_LABEL = "Importance traits number"
|
78 |
NUMBER_IMPORTANCE_OPE_LABEL = "Openness weight"
|
@@ -7,6 +7,7 @@
|
|
7 |
subtasks:
|
8 |
- "Finding a suitable junior colleague"
|
9 |
- "Finding a suitable senior colleague"
|
|
|
10 |
- task: "Predicting consumer preferences for industrial goods"
|
11 |
subtasks:
|
12 |
- "Car characteristics"
|
|
|
7 |
subtasks:
|
8 |
- "Finding a suitable junior colleague"
|
9 |
- "Finding a suitable senior colleague"
|
10 |
+
- "Finding a suitable colleague by personality types"
|
11 |
- task: "Predicting consumer preferences for industrial goods"
|
12 |
subtasks:
|
13 |
- "Car characteristics"
|
@@ -7,6 +7,7 @@
|
|
7 |
subtasks:
|
8 |
- "Поиск подходящего младшего коллеги"
|
9 |
- "Поиск подходящего старшего коллеги"
|
|
|
10 |
- task: "Прогнозирование потребительских предпочтений в отношении промышленных товаров"
|
11 |
subtasks:
|
12 |
- "Характеристики автомобиля"
|
|
|
7 |
subtasks:
|
8 |
- "Поиск подходящего младшего коллеги"
|
9 |
- "Поиск подходящего старшего коллеги"
|
10 |
+
- "Поиск подходящего коллеги по типам личности"
|
11 |
- task: "Прогнозирование потребительских предпочтений в отношении промышленных товаров"
|
12 |
subtasks:
|
13 |
- "Характеристики автомобиля"
|