Spaces:
Running
Running
DmitryRyumin
commited on
Commit
•
c3645b6
1
Parent(s):
2d6ceb7
Summary
Browse files- app.css +6 -2
- app/app.py +28 -28
- app/authors.py +4 -4
- app/components.py +2 -0
- app/event_handlers/calculate_pt_scores_blocks.py +1 -0
- app/event_handlers/clear_blocks.py +9 -1
- app/event_handlers/files.py +16 -2
- app/event_handlers/languages.py +2 -2
- app/tabs.py +14 -2
- config.toml +9 -9
- images/calculate_pt_scores.ico +0 -0
- images/clear.ico +0 -0
- images/examples.ico +0 -0
- images/pt.ico +0 -0
app.css
CHANGED
@@ -41,7 +41,7 @@ div.files-container label[data-testid="block-label"] {
|
|
41 |
|
42 |
.calculate_oceanai,
|
43 |
.calculate_practical_task {
|
44 |
-
display:
|
45 |
padding: 10px 20px;
|
46 |
font-size: 16px;
|
47 |
font-weight: bold;
|
@@ -56,7 +56,7 @@ div.files-container label[data-testid="block-label"] {
|
|
56 |
}
|
57 |
|
58 |
.examples_oceanai, .clear_oceanai {
|
59 |
-
display:
|
60 |
padding: 10px 20px;
|
61 |
font-size: 16px;
|
62 |
font-weight: bold;
|
@@ -145,4 +145,8 @@ div.dataframe span.wrapper_mbti > span.err {
|
|
145 |
|
146 |
div.mbti-dataframe div.table-wrap {
|
147 |
--cell-width-0: 260px !important;
|
|
|
|
|
|
|
|
|
148 |
}
|
|
|
41 |
|
42 |
.calculate_oceanai,
|
43 |
.calculate_practical_task {
|
44 |
+
display: flex;
|
45 |
padding: 10px 20px;
|
46 |
font-size: 16px;
|
47 |
font-weight: bold;
|
|
|
56 |
}
|
57 |
|
58 |
.examples_oceanai, .clear_oceanai {
|
59 |
+
display: flex;
|
60 |
padding: 10px 20px;
|
61 |
font-size: 16px;
|
62 |
font-weight: bold;
|
|
|
145 |
|
146 |
div.mbti-dataframe div.table-wrap {
|
147 |
--cell-width-0: 260px !important;
|
148 |
+
}
|
149 |
+
|
150 |
+
div.about_app pre {
|
151 |
+
text-wrap: wrap;
|
152 |
}
|
app/app.py
CHANGED
@@ -6,7 +6,7 @@ License: MIT License
|
|
6 |
"""
|
7 |
|
8 |
APP = """
|
9 |
-
<div>
|
10 |
<div style="max-width: 90%; margin: auto; padding: 20px;">
|
11 |
<p style="text-align: center;">
|
12 |
<img src="https://raw.githubusercontent.com/aimclub/OCEANAI/main/docs/source/_static/logo.svg" alt="Logo" style="width: 20%; height: auto; display: block; margin: auto;">
|
@@ -65,39 +65,39 @@ APP = """
|
|
65 |
<h3>Journals</h3>
|
66 |
<pre>
|
67 |
<code>
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
</code>
|
88 |
</pre>
|
89 |
|
90 |
<h3>Conferences</h3>
|
91 |
<pre>
|
92 |
<code>
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
</code>
|
102 |
</pre>
|
103 |
</div>
|
|
|
6 |
"""
|
7 |
|
8 |
APP = """
|
9 |
+
<div class="about_app">
|
10 |
<div style="max-width: 90%; margin: auto; padding: 20px;">
|
11 |
<p style="text-align: center;">
|
12 |
<img src="https://raw.githubusercontent.com/aimclub/OCEANAI/main/docs/source/_static/logo.svg" alt="Logo" style="width: 20%; height: auto; display: block; margin: auto;">
|
|
|
65 |
<h3>Journals</h3>
|
66 |
<pre>
|
67 |
<code>
|
68 |
+
@article{ryumina22_neurocomputing,
|
69 |
+
author = {Elena Ryumina and Denis Dresvyanskiy and Alexey Karpov},
|
70 |
+
title = {In Search of a Robust Facial Expressions Recognition Model: A Large-Scale Visual Cross-Corpus Study},
|
71 |
+
journal = {Neurocomputing},
|
72 |
+
volume = {514},
|
73 |
+
pages = {435-450},
|
74 |
+
year = {2022},
|
75 |
+
doi = {<a href="https://doi.org/10.1016/j.neucom.2022.10.013">https://doi.org/10.1016/j.neucom.2022.10.013</a>},
|
76 |
+
}
|
77 |
+
|
78 |
+
@article{ryumina24_eswa,
|
79 |
+
author = {Elena Ryumina and Maxim Markitantov and Dmitry Ryumin and Alexey Karpov},
|
80 |
+
title = {OCEAN-AI Framework with EmoFormer Cross-Hemiface Attention Approach for Personality Traits Assessment},
|
81 |
+
journal = {Expert Systems with Applications},
|
82 |
+
volume = {239},
|
83 |
+
pages = {122441},
|
84 |
+
year = {2024},
|
85 |
+
doi = {<a href="https://doi.org/10.1016/j.eswa.2023.122441">https://doi.org/10.1016/j.eswa.2023.122441</a>},
|
86 |
+
}
|
87 |
</code>
|
88 |
</pre>
|
89 |
|
90 |
<h3>Conferences</h3>
|
91 |
<pre>
|
92 |
<code>
|
93 |
+
@inproceedings{ryumina23_interspeech,
|
94 |
+
author = {Elena Ryumina and Dmitry Ryumin and Maxim Markitantov and Heysem Kaya and Alexey Karpov},
|
95 |
+
title = {Multimodal Personality Traits Assessment (MuPTA) Corpus: The Impact of Spontaneous and Read Speech},
|
96 |
+
year = {2023},
|
97 |
+
booktitle = {INTERSPEECH},
|
98 |
+
pages = {4049--4053},
|
99 |
+
doi = {<a href="https://doi.org/10.21437/Interspeech.2023-1686">https://doi.org/10.21437/Interspeech.2023-1686</a>},
|
100 |
+
}
|
101 |
</code>
|
102 |
</pre>
|
103 |
</div>
|
app/authors.py
CHANGED
@@ -6,7 +6,7 @@ License: MIT License
|
|
6 |
"""
|
7 |
|
8 |
AUTHORS = """
|
9 |
-
<div style="display: flex; justify-content: center;">
|
10 |
<div style="flex-basis: 40%;">
|
11 |
<a href="https://github.com/ElenaRyumina">
|
12 |
<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=Elena+Ryumina;Artificial+Intelligence+Researcher" alt="ElenaRyumina" />
|
@@ -76,9 +76,9 @@ AUTHORS = """
|
|
76 |
<a href="https://github.com/DmitryRyumin" style="display: inline-block;">
|
77 |
<img src="https://github-stats-alpha.vercel.app/api?username=DmitryRyumin&cc=3081F7&tc=FFFFFF&ic=FFFFFF&bc=FFFFFF" alt="" />
|
78 |
</a>
|
79 |
-
<div style="display: flex;">
|
80 |
-
<img src="https://custom-icon-badges.demolab.com/badge/dynamic/json?style=flat-square&logo=fire&logoColor=fff&color=orange&label=GitHub%20streak&query=%24.currentStreak.length&suffix=%20days&url=https%3A%2F%2Fstreak-stats.demolab.com%2F%3Fuser%3Ddmitryryumin%26type%3Djson" alt="" style="margin-right: 6px;" />
|
81 |
-
<img src="https://komarev.com/ghpvc/?username=DmitryRyumin&style=flat-square" alt="" />
|
82 |
</div>
|
83 |
</div>
|
84 |
</div>
|
|
|
6 |
"""
|
7 |
|
8 |
AUTHORS = """
|
9 |
+
<div style="display: flex; justify-content: center; gap: 10px;">
|
10 |
<div style="flex-basis: 40%;">
|
11 |
<a href="https://github.com/ElenaRyumina">
|
12 |
<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=Elena+Ryumina;Artificial+Intelligence+Researcher" alt="ElenaRyumina" />
|
|
|
76 |
<a href="https://github.com/DmitryRyumin" style="display: inline-block;">
|
77 |
<img src="https://github-stats-alpha.vercel.app/api?username=DmitryRyumin&cc=3081F7&tc=FFFFFF&ic=FFFFFF&bc=FFFFFF" alt="" />
|
78 |
</a>
|
79 |
+
<div style="display: flex; flex-wrap: wrap;">
|
80 |
+
<img src="https://custom-icon-badges.demolab.com/badge/dynamic/json?style=flat-square&logo=fire&logoColor=fff&color=orange&label=GitHub%20streak&query=%24.currentStreak.length&suffix=%20days&url=https%3A%2F%2Fstreak-stats.demolab.com%2F%3Fuser%3Ddmitryryumin%26type%3Djson" alt="" style="margin-right: 6px; margin-bottom: 6px;" />
|
81 |
+
<img src="https://komarev.com/ghpvc/?username=DmitryRyumin&style=flat-square" alt="" style="margin-bottom: 6px;" />
|
82 |
</div>
|
83 |
</div>
|
84 |
</div>
|
app/components.py
CHANGED
@@ -91,6 +91,7 @@ def button(
|
|
91 |
value: str = "",
|
92 |
interactive: bool = True,
|
93 |
scale: int = 3,
|
|
|
94 |
visible: bool = True,
|
95 |
elem_classes: Optional[str] = None,
|
96 |
) -> gr.Button:
|
@@ -98,6 +99,7 @@ def button(
|
|
98 |
value=value,
|
99 |
interactive=interactive,
|
100 |
scale=scale,
|
|
|
101 |
visible=visible,
|
102 |
elem_classes=elem_classes,
|
103 |
)
|
|
|
91 |
value: str = "",
|
92 |
interactive: bool = True,
|
93 |
scale: int = 3,
|
94 |
+
icon: Optional[str] = None,
|
95 |
visible: bool = True,
|
96 |
elem_classes: Optional[str] = None,
|
97 |
) -> gr.Button:
|
|
|
99 |
value=value,
|
100 |
interactive=interactive,
|
101 |
scale=scale,
|
102 |
+
icon=icon,
|
103 |
visible=visible,
|
104 |
elem_classes=elem_classes,
|
105 |
)
|
app/event_handlers/calculate_pt_scores_blocks.py
CHANGED
@@ -132,6 +132,7 @@ def event_handler_calculate_pt_scores_blocks(files, evt_data: gr.EventData):
|
|
132 |
config_data.OtherMessages_CALCULATE_PRACTICAL_TASK,
|
133 |
True,
|
134 |
1,
|
|
|
135 |
True,
|
136 |
"calculate_practical_task",
|
137 |
),
|
|
|
132 |
config_data.OtherMessages_CALCULATE_PRACTICAL_TASK,
|
133 |
True,
|
134 |
1,
|
135 |
+
"./images/pt.ico",
|
136 |
True,
|
137 |
"calculate_practical_task",
|
138 |
),
|
app/event_handlers/clear_blocks.py
CHANGED
@@ -34,10 +34,18 @@ def event_handler_clear_blocks():
|
|
34 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
35 |
False,
|
36 |
3,
|
|
|
37 |
True,
|
38 |
"calculate_oceanai",
|
39 |
),
|
40 |
-
button(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
dataframe(visible=False),
|
42 |
files_create_ui(
|
43 |
None,
|
|
|
34 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
35 |
False,
|
36 |
3,
|
37 |
+
"./images/calculate_pt_scores.ico",
|
38 |
True,
|
39 |
"calculate_oceanai",
|
40 |
),
|
41 |
+
button(
|
42 |
+
config_data.OtherMessages_CLEAR_APP,
|
43 |
+
False,
|
44 |
+
1,
|
45 |
+
"./images/clear.ico",
|
46 |
+
True,
|
47 |
+
"clear_oceanai",
|
48 |
+
),
|
49 |
dataframe(visible=False),
|
50 |
files_create_ui(
|
51 |
None,
|
app/event_handlers/files.py
CHANGED
@@ -22,11 +22,17 @@ def event_handler_files(files):
|
|
22 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
23 |
False,
|
24 |
3,
|
|
|
25 |
True,
|
26 |
"calculate_oceanai",
|
27 |
),
|
28 |
button(
|
29 |
-
config_data.OtherMessages_CLEAR_APP,
|
|
|
|
|
|
|
|
|
|
|
30 |
),
|
31 |
)
|
32 |
|
@@ -37,10 +43,18 @@ def event_handler_files(files):
|
|
37 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
38 |
True,
|
39 |
3,
|
|
|
40 |
True,
|
41 |
"calculate_oceanai",
|
42 |
),
|
43 |
-
button(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
)
|
45 |
|
46 |
|
|
|
22 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
23 |
False,
|
24 |
3,
|
25 |
+
"./images/calculate_pt_scores.ico",
|
26 |
True,
|
27 |
"calculate_oceanai",
|
28 |
),
|
29 |
button(
|
30 |
+
config_data.OtherMessages_CLEAR_APP,
|
31 |
+
False,
|
32 |
+
1,
|
33 |
+
"./images/clear.ico",
|
34 |
+
True,
|
35 |
+
"clear_oceanai",
|
36 |
),
|
37 |
)
|
38 |
|
|
|
43 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
44 |
True,
|
45 |
3,
|
46 |
+
"./images/calculate_pt_scores.ico",
|
47 |
True,
|
48 |
"calculate_oceanai",
|
49 |
),
|
50 |
+
button(
|
51 |
+
config_data.OtherMessages_CLEAR_APP,
|
52 |
+
True,
|
53 |
+
1,
|
54 |
+
"./images/clear.ico",
|
55 |
+
True,
|
56 |
+
"clear_oceanai",
|
57 |
+
),
|
58 |
)
|
59 |
|
60 |
|
app/event_handlers/languages.py
CHANGED
@@ -13,10 +13,10 @@ from app.components import dropdown_create_ui
|
|
13 |
|
14 |
|
15 |
def event_handler_languages(languages):
|
16 |
-
if languages.lower() == "english":
|
17 |
lang_id = 0
|
18 |
choices = config_data.Settings_LANGUAGES_EN
|
19 |
-
elif languages.lower() == "russian":
|
20 |
lang_id = 1
|
21 |
choices = config_data.Settings_LANGUAGES_RU
|
22 |
else:
|
|
|
13 |
|
14 |
|
15 |
def event_handler_languages(languages):
|
16 |
+
if languages.lower() == "🇬🇧 english":
|
17 |
lang_id = 0
|
18 |
choices = config_data.Settings_LANGUAGES_EN
|
19 |
+
elif languages.lower() == "🇷🇺 russian":
|
20 |
lang_id = 1
|
21 |
choices = config_data.Settings_LANGUAGES_RU
|
22 |
else:
|
app/tabs.py
CHANGED
@@ -40,17 +40,28 @@ def app_tab():
|
|
40 |
|
41 |
with gr.Row():
|
42 |
examples = button(
|
43 |
-
config_data.OtherMessages_EXAMPLES_APP,
|
|
|
|
|
|
|
|
|
|
|
44 |
)
|
45 |
calculate_pt_scores = button(
|
46 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
47 |
False,
|
48 |
3,
|
|
|
49 |
True,
|
50 |
"calculate_oceanai",
|
51 |
)
|
52 |
clear_app = button(
|
53 |
-
config_data.OtherMessages_CLEAR_APP,
|
|
|
|
|
|
|
|
|
|
|
54 |
)
|
55 |
|
56 |
notifications = html_message(config_data.InformationMessages_NOTI_VIDEOS, False)
|
@@ -377,6 +388,7 @@ def app_tab():
|
|
377 |
config_data.OtherMessages_CALCULATE_PRACTICAL_TASK,
|
378 |
True,
|
379 |
1,
|
|
|
380 |
False,
|
381 |
"calculate_practical_task",
|
382 |
)
|
|
|
40 |
|
41 |
with gr.Row():
|
42 |
examples = button(
|
43 |
+
config_data.OtherMessages_EXAMPLES_APP,
|
44 |
+
True,
|
45 |
+
1,
|
46 |
+
"./images/examples.ico",
|
47 |
+
True,
|
48 |
+
"examples_oceanai",
|
49 |
)
|
50 |
calculate_pt_scores = button(
|
51 |
config_data.OtherMessages_CALCULATE_PT_SCORES,
|
52 |
False,
|
53 |
3,
|
54 |
+
"./images/calculate_pt_scores.ico",
|
55 |
True,
|
56 |
"calculate_oceanai",
|
57 |
)
|
58 |
clear_app = button(
|
59 |
+
config_data.OtherMessages_CLEAR_APP,
|
60 |
+
False,
|
61 |
+
1,
|
62 |
+
"./images/clear.ico",
|
63 |
+
True,
|
64 |
+
"clear_oceanai",
|
65 |
)
|
66 |
|
67 |
notifications = html_message(config_data.InformationMessages_NOTI_VIDEOS, False)
|
|
|
388 |
config_data.OtherMessages_CALCULATE_PRACTICAL_TASK,
|
389 |
True,
|
390 |
1,
|
391 |
+
"./images/pt.ico",
|
392 |
False,
|
393 |
"calculate_practical_task",
|
394 |
)
|
config.toml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
[AppSettings]
|
2 |
-
APP_VERSION = "0.8.
|
3 |
CSS_PATH = "app.css"
|
4 |
|
5 |
[InformationMessages]
|
@@ -31,9 +31,9 @@ EXPORT_MBTI = "Export ranking personality type results to a CSV file"
|
|
31 |
NOTI_CALCULATE = "You can calculate Big Five personality traits scores"
|
32 |
|
33 |
[Labels]
|
34 |
-
APP_LABEL = ["App", "Приложение"]
|
35 |
-
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 = "Polarity traits threshold"
|
@@ -56,9 +56,9 @@ LANGUAGES_LABEL = "Languages"
|
|
56 |
NOTE_MBTI_LABEL = "Note: What are Personality Types of MBTI?"
|
57 |
|
58 |
[TabCreators]
|
59 |
-
"App" = "app_tab"
|
60 |
-
"About the App" = "about_app_tab"
|
61 |
-
"About the Authors" = "about_authors_tab"
|
62 |
|
63 |
[Filenames]
|
64 |
PT_SCORES = "personality_traits_scores.csv"
|
@@ -70,8 +70,8 @@ POTENTIAL_CANDIDATES = "potential_candidates.csv"
|
|
70 |
MBTI_JOB = "mbti_job_match.csv"
|
71 |
|
72 |
[Settings]
|
73 |
-
LANGUAGES_EN = ["English", "Russian"]
|
74 |
-
LANGUAGES_RU = ["Английский", "Русский"]
|
75 |
SHORT_PROFESSIONAL_SKILLS = ["OPE", "CON", "EXT", "AGR", "NNEU"]
|
76 |
DROPDOWN_PROFESSIONAL_SKILLS = ["Analytical", "Interactive", "Routine", "Non-Routine"]
|
77 |
DROPDOWN_COLLEAGUES = ["major", "minor"]
|
|
|
1 |
[AppSettings]
|
2 |
+
APP_VERSION = "0.8.2"
|
3 |
CSS_PATH = "app.css"
|
4 |
|
5 |
[InformationMessages]
|
|
|
31 |
NOTI_CALCULATE = "You can calculate Big Five personality traits scores"
|
32 |
|
33 |
[Labels]
|
34 |
+
APP_LABEL = ["⭐ App", "⭐ Приложение"]
|
35 |
+
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 = "Polarity traits threshold"
|
|
|
56 |
NOTE_MBTI_LABEL = "Note: What are Personality Types of MBTI?"
|
57 |
|
58 |
[TabCreators]
|
59 |
+
"⭐ App" = "app_tab"
|
60 |
+
"💡 About the App" = "about_app_tab"
|
61 |
+
"🎭 About the Authors" = "about_authors_tab"
|
62 |
|
63 |
[Filenames]
|
64 |
PT_SCORES = "personality_traits_scores.csv"
|
|
|
70 |
MBTI_JOB = "mbti_job_match.csv"
|
71 |
|
72 |
[Settings]
|
73 |
+
LANGUAGES_EN = ["🇬🇧 English", "🇷🇺 Russian"]
|
74 |
+
LANGUAGES_RU = ["🇬🇧 Английский", "🇷🇺 Русский"]
|
75 |
SHORT_PROFESSIONAL_SKILLS = ["OPE", "CON", "EXT", "AGR", "NNEU"]
|
76 |
DROPDOWN_PROFESSIONAL_SKILLS = ["Analytical", "Interactive", "Routine", "Non-Routine"]
|
77 |
DROPDOWN_COLLEAGUES = ["major", "minor"]
|
images/calculate_pt_scores.ico
ADDED
images/clear.ico
ADDED
images/examples.ico
ADDED
images/pt.ico
ADDED