DmitryRyumin commited on
Commit
8cadd29
1 Parent(s): cf73f57
app.css CHANGED
@@ -20,7 +20,9 @@ div.files-container {
20
  max-height: 350px;
21
  }
22
 
23
- div.files-container:hover label[data-testid="block-label"] {
 
 
24
  display: none;
25
  }
26
 
 
20
  max-height: 350px;
21
  }
22
 
23
+ div.files-container:hover label[data-testid="block-label"],
24
+ div.video-container:hover label[data-testid="block-label"],
25
+ div.video-sorted-container:hover label[data-testid="block-label"] {
26
  display: none;
27
  }
28
 
app/authors.py CHANGED
@@ -86,7 +86,7 @@ AUTHORS = """
86
  <img src="https://huggingface.co/spaces/ElenaRyumina/OCEANAI/resolve/main/images/AA.jpg" alt="Professor Alexey Karpov" style="margin-right: 20px; border-radius: 50%; width: 80px; height: 80px; object-fit: cover;">
87
  <div style="flex-basis: 40%;">
88
  <a href="https://hci.nw.ru/en/employees/1" style="display: inline-block;">
89
- <img src="https://readme-typing-svg.demolab.com?font=Roboto&duration=1500&pause=100&color=3081F7&vCenter=true&multiline=true&width=435&height=70&lines=Dr.Sc.+Alexey+Karpov;Supervisor" alt="AlexeyKarpov" />
90
  </a>
91
  <div style="display: flex; margin-bottom: 6px;">
92
  <a href="https://www.webofscience.com/wos/author/record/A-8905-2012" style="margin-right: 6px;">
 
86
  <img src="https://huggingface.co/spaces/ElenaRyumina/OCEANAI/resolve/main/images/AA.jpg" alt="Professor Alexey Karpov" style="margin-right: 20px; border-radius: 50%; width: 80px; height: 80px; object-fit: cover;">
87
  <div style="flex-basis: 40%;">
88
  <a href="https://hci.nw.ru/en/employees/1" style="display: inline-block;">
89
+ <img src="https://readme-typing-svg.demolab.com?font=Roboto&duration=1500&pause=100&color=3081F7&vCenter=true&multiline=true&width=435&height=70&lines=Dr.Sc.+Alexey+Karpov;Team+Leader" alt="AlexeyKarpov" />
90
  </a>
91
  <div style="display: flex; margin-bottom: 6px;">
92
  <a href="https://www.webofscience.com/wos/author/record/A-8905-2012" style="margin-right: 6px;">
app/event_handlers/calculate_practical_tasks.py CHANGED
@@ -45,17 +45,20 @@ def extract_text_in_parentheses(s):
45
  return None
46
 
47
 
48
- def compare_strings(original, comparison):
49
  result = []
50
  prev_class = None
51
 
52
  for orig_char, comp_char in zip(original, comparison):
53
  curr_class = "true" if orig_char == comp_char else "err"
54
- if curr_class != prev_class:
55
- result.append("</span>" if prev_class else "")
56
- result.append(f"<span class='{curr_class}'>")
57
- prev_class = curr_class
58
- result.append(comp_char)
 
 
 
59
 
60
  return f"<span class='wrapper_mbti'>{''.join(result + [f'</span>' if prev_class else ''])}</span>"
61
 
@@ -83,7 +86,7 @@ def event_handler_calculate_practical_task_blocks(
83
  number_agreeableness,
84
  number_non_neuroticism,
85
  ):
86
- if practical_subtasks.lower() == "sixteen myers-briggs personality type indicators":
87
  df_correlation_coefficients = read_csv_file(config_data.Links_MBTI)
88
 
89
  pt_scores_copy = pt_scores.iloc[:, 1:].copy()
@@ -105,6 +108,15 @@ def event_handler_calculate_practical_task_blocks(
105
  + config_data.Settings_DROPDOWN_MBTI_DEL_COLS
106
  )
107
 
 
 
 
 
 
 
 
 
 
108
  df_hidden.to_csv(config_data.Filenames_MBTI_JOB)
109
 
110
  df_hidden.reset_index(inplace=True)
@@ -112,9 +124,11 @@ def event_handler_calculate_practical_task_blocks(
112
  person_id = int(df_hidden.iloc[0]["Person ID"]) - 1
113
 
114
  short_mbti = extract_text_in_parentheses(dropdown_mbti)
115
- mbti_values = df_hidden["MBTI"].tolist()
116
 
117
- df_hidden["MBTI"] = [compare_strings(short_mbti, mbti) for mbti in mbti_values]
 
 
118
 
119
  return (
120
  gr.Row(visible=True),
 
45
  return None
46
 
47
 
48
+ def compare_strings(original, comparison, prev=False):
49
  result = []
50
  prev_class = None
51
 
52
  for orig_char, comp_char in zip(original, comparison):
53
  curr_class = "true" if orig_char == comp_char else "err"
54
+ if not prev:
55
+ result.append(f"<span class='{curr_class}'>{comp_char}</span>")
56
+ else:
57
+ if curr_class != prev_class:
58
+ result.append("</span>" if prev_class else "")
59
+ result.append(f"<span class='{curr_class}'>")
60
+ prev_class = curr_class
61
+ result.append(comp_char)
62
 
63
  return f"<span class='wrapper_mbti'>{''.join(result + [f'</span>' if prev_class else ''])}</span>"
64
 
 
86
  number_agreeableness,
87
  number_non_neuroticism,
88
  ):
89
+ if practical_subtasks.lower() == "16 personality types of mbti":
90
  df_correlation_coefficients = read_csv_file(config_data.Links_MBTI)
91
 
92
  pt_scores_copy = pt_scores.iloc[:, 1:].copy()
 
108
  + config_data.Settings_DROPDOWN_MBTI_DEL_COLS
109
  )
110
 
111
+ df_hidden.rename(
112
+ columns={
113
+ "Path": "Filename",
114
+ "MBTI": "Personality Type",
115
+ "MBTI_Score": "Personality Type Score",
116
+ },
117
+ inplace=True,
118
+ )
119
+
120
  df_hidden.to_csv(config_data.Filenames_MBTI_JOB)
121
 
122
  df_hidden.reset_index(inplace=True)
 
124
  person_id = int(df_hidden.iloc[0]["Person ID"]) - 1
125
 
126
  short_mbti = extract_text_in_parentheses(dropdown_mbti)
127
+ mbti_values = df_hidden["Personality Type"].tolist()
128
 
129
+ df_hidden["Personality Type"] = [
130
+ compare_strings(short_mbti, mbti, False) for mbti in mbti_values
131
+ ]
132
 
133
  return (
134
  gr.Row(visible=True),
app/event_handlers/calculate_pt_scores_blocks.py CHANGED
@@ -91,7 +91,7 @@ def event_handler_calculate_pt_scores_blocks(files, evt_data: gr.EventData):
91
  ),
92
  gr.Column(visible=True),
93
  dropdown_create_ui(
94
- label=f"Potential candidates by Myers-Briggs Personality Type Indicators ({len(config_data.Settings_DROPDOWN_MBTI)})",
95
  info=config_data.InformationMessages_DROPDOWN_MBTI_INFO,
96
  choices=config_data.Settings_DROPDOWN_MBTI,
97
  value=config_data.Settings_DROPDOWN_MBTI[0],
 
91
  ),
92
  gr.Column(visible=True),
93
  dropdown_create_ui(
94
+ label=f"Potential candidates by Personality Type of MBTI ({len(config_data.Settings_DROPDOWN_MBTI)})",
95
  info=config_data.InformationMessages_DROPDOWN_MBTI_INFO,
96
  choices=config_data.Settings_DROPDOWN_MBTI,
97
  value=config_data.Settings_DROPDOWN_MBTI[0],
app/event_handlers/practical_subtasks.py CHANGED
@@ -18,12 +18,12 @@ def event_handler_practical_subtasks(
18
  ):
19
  practical_subtasks_selected[practical_tasks] = practical_subtasks
20
 
21
- if practical_subtasks.lower() == "sixteen myers-briggs personality type indicators":
22
  return (
23
  practical_subtasks_selected,
24
  gr.Column(visible=True),
25
  dropdown_create_ui(
26
- label=f"Potential candidates by Myers-Briggs Personality Type Indicators ({len(config_data.Settings_DROPDOWN_MBTI)})",
27
  info=config_data.InformationMessages_DROPDOWN_MBTI_INFO,
28
  choices=config_data.Settings_DROPDOWN_MBTI,
29
  value=config_data.Settings_DROPDOWN_MBTI[0],
 
18
  ):
19
  practical_subtasks_selected[practical_tasks] = practical_subtasks
20
 
21
+ if practical_subtasks.lower() == "16 personality types of mbti":
22
  return (
23
  practical_subtasks_selected,
24
  gr.Column(visible=True),
25
  dropdown_create_ui(
26
+ label=f"Potential candidates by Personality Type of MBTI ({len(config_data.Settings_DROPDOWN_MBTI)})",
27
  info=config_data.InformationMessages_DROPDOWN_MBTI_INFO,
28
  choices=config_data.Settings_DROPDOWN_MBTI,
29
  value=config_data.Settings_DROPDOWN_MBTI[0],
app/event_handlers/practical_task_sorted.py CHANGED
@@ -28,4 +28,5 @@ def event_handler_practical_task_sorted(
28
  file_name=Path(files[person_id]).name,
29
  label=f"{label} - " + str(person_id + 1),
30
  visible=True,
 
31
  )
 
28
  file_name=Path(files[person_id]).name,
29
  label=f"{label} - " + str(person_id + 1),
30
  visible=True,
31
+ elem_classes="video-sorted-container",
32
  )
app/mbti_description.py CHANGED
@@ -26,4 +26,6 @@ MBTI_DATA = pd.DataFrame(
26
  }
27
  )
28
 
29
- MBTI_DESCRIPTION = "<h4>The four human Personality Dimensions</h4>"
 
 
 
26
  }
27
  )
28
 
29
+ MBTI_DESCRIPTION = (
30
+ "<h4>Personality types of MBTI are based on four Personality Dimensions</h4>"
31
+ )
app/tabs.py CHANGED
@@ -98,7 +98,7 @@ def app_tab():
98
  elem_classes="settings-container",
99
  ) as settings_practical_tasks:
100
  dropdown_mbti = dropdown_create_ui(
101
- label=f"Potential candidates by Myers-Briggs Personality Type Indicators ({len(config_data.Settings_DROPDOWN_MBTI)})",
102
  info=config_data.InformationMessages_DROPDOWN_MBTI_INFO,
103
  choices=config_data.Settings_DROPDOWN_MBTI,
104
  value=config_data.Settings_DROPDOWN_MBTI[0],
 
98
  elem_classes="settings-container",
99
  ) as settings_practical_tasks:
100
  dropdown_mbti = dropdown_create_ui(
101
+ label=f"Potential candidates by Personality Type of MBTI ({len(config_data.Settings_DROPDOWN_MBTI)})",
102
  info=config_data.InformationMessages_DROPDOWN_MBTI_INFO,
103
  choices=config_data.Settings_DROPDOWN_MBTI,
104
  value=config_data.Settings_DROPDOWN_MBTI[0],
config.toml CHANGED
@@ -1,5 +1,5 @@
1
  [AppSettings]
2
- APP_VERSION = "0.8.0"
3
  CSS_PATH = "app.css"
4
 
5
  [InformationMessages]
@@ -36,7 +36,7 @@ ABOUT_APP_LABEL = ["About the App", "О приложении"]
36
  ABOUT_AUTHORS_LABEL = ["About the Authors", "Об авторах"]
37
  PRACTICAL_TASKS_LABEL = "Practical tasks"
38
  PRACTICAL_SUBTASKS_LABEL = "Practical subtasks"
39
- THRESHOLD_MBTI_LABEL = "Personality type indicator threshold"
40
  THRESHOLD_PROFESSIONAL_SKILLS_LABEL = "Polarity traits threshold"
41
  TARGET_SCORE_OPE_LABEL = "Openness target score"
42
  TARGET_SCORE_CON_LABEL = "Conscientiousness target score"
@@ -53,7 +53,7 @@ NUMBER_IMPORTANCE_AGR_LABEL = "Agreeableness weight"
53
  NUMBER_IMPORTANCE_NNEU_LABEL = "Non-Neuroticism weight"
54
  THRESHOLD_CONSUMER_PREFERENCES_LABEL = "Polarity traits threshold"
55
  LANGUAGES_LABEL = "Languages"
56
- NOTE_MBTI_LABEL = "Note: What is MBTI?"
57
 
58
  [TabCreators]
59
  "App" = "app_tab"
 
1
  [AppSettings]
2
+ APP_VERSION = "0.8.1"
3
  CSS_PATH = "app.css"
4
 
5
  [InformationMessages]
 
36
  ABOUT_AUTHORS_LABEL = ["About the Authors", "Об авторах"]
37
  PRACTICAL_TASKS_LABEL = "Practical tasks"
38
  PRACTICAL_SUBTASKS_LABEL = "Practical subtasks"
39
+ THRESHOLD_MBTI_LABEL = "Polarity traits threshold"
40
  THRESHOLD_PROFESSIONAL_SKILLS_LABEL = "Polarity traits threshold"
41
  TARGET_SCORE_OPE_LABEL = "Openness target score"
42
  TARGET_SCORE_CON_LABEL = "Conscientiousness target score"
 
53
  NUMBER_IMPORTANCE_NNEU_LABEL = "Non-Neuroticism weight"
54
  THRESHOLD_CONSUMER_PREFERENCES_LABEL = "Polarity traits threshold"
55
  LANGUAGES_LABEL = "Languages"
56
+ NOTE_MBTI_LABEL = "Note: What are Personality Types of MBTI?"
57
 
58
  [TabCreators]
59
  "App" = "app_tab"
practical_tasks.yaml CHANGED
@@ -1,6 +1,6 @@
1
  - task: "Ranking potential candidates by professional responsibilities"
2
  subtasks:
3
- - "Sixteen Myers-Briggs Personality Type Indicators"
4
  - "Professional groups"
5
  - "Professional skills"
6
  - task: "Forming effective work teams"
 
1
  - task: "Ranking potential candidates by professional responsibilities"
2
  subtasks:
3
+ - "16 Personality Types of MBTI"
4
  - "Professional groups"
5
  - "Professional skills"
6
  - task: "Forming effective work teams"