Spaces:
Running
Running
v0.8.6
#14
by
DmitryRyumin
- opened
- app.css +5 -0
- app/authors.py +1 -1
- app/description.py +1 -0
- app/event_handlers/event_handlers.py +1 -0
- app/requirements_app.py +37 -0
- app/tabs.py +12 -0
- config.toml +3 -1
app.css
CHANGED
|
@@ -5,6 +5,11 @@
|
|
| 5 |
color: #006900;
|
| 6 |
}
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
div.video-container {
|
| 9 |
height: 350px;
|
| 10 |
max-height: 350px;
|
|
|
|
| 5 |
color: #006900;
|
| 6 |
}
|
| 7 |
|
| 8 |
+
div.app-flex-container {
|
| 9 |
+
display: flex;
|
| 10 |
+
gap: 6px;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
div.video-container {
|
| 14 |
height: 350px;
|
| 15 |
max-height: 350px;
|
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
|
| 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/description.py
CHANGED
|
@@ -13,5 +13,6 @@ DESCRIPTION = f"""\
|
|
| 13 |
|
| 14 |
<div class="app-flex-container">
|
| 15 |
<img src="https://img.shields.io/badge/version-v{config_data.AppSettings_APP_VERSION}-rc0" alt="Version">
|
|
|
|
| 16 |
</div>
|
| 17 |
"""
|
|
|
|
| 13 |
|
| 14 |
<div class="app-flex-container">
|
| 15 |
<img src="https://img.shields.io/badge/version-v{config_data.AppSettings_APP_VERSION}-rc0" alt="Version">
|
| 16 |
+
<a href='https://github.com/DmitryRyumin/OCEANAI' target='_blank'><img src='https://img.shields.io/github/stars/DmitryRyumin/OCEANAI?style=flat' alt='GitHub' /></a>
|
| 17 |
</div>
|
| 18 |
"""
|
app/event_handlers/event_handlers.py
CHANGED
|
@@ -90,6 +90,7 @@ def setup_app_event_handlers(
|
|
| 90 |
tab1,
|
| 91 |
tab2,
|
| 92 |
tab3,
|
|
|
|
| 93 |
languages_row,
|
| 94 |
country_flags,
|
| 95 |
languages,
|
|
|
|
| 90 |
tab1,
|
| 91 |
tab2,
|
| 92 |
tab3,
|
| 93 |
+
tab4,
|
| 94 |
languages_row,
|
| 95 |
country_flags,
|
| 96 |
languages,
|
app/requirements_app.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
File: requirements_app.py
|
| 3 |
+
Author: Elena Ryumina and Dmitry Ryumin
|
| 4 |
+
Description: Project requirements for the Gradio app.
|
| 5 |
+
License: MIT License
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
import pandas as pd
|
| 9 |
+
|
| 10 |
+
# Importing necessary components for the Gradio app
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def read_requirements_to_df(file_path="requirements.txt"):
|
| 14 |
+
with open(file_path, "r") as file:
|
| 15 |
+
lines = file.readlines()
|
| 16 |
+
|
| 17 |
+
data = []
|
| 18 |
+
|
| 19 |
+
pypi = (
|
| 20 |
+
lambda x: f"<a href='https://pypi.org/project/{x}' target='_blank'><img src='https://img.shields.io/pypi/v/{x}' alt='PyPI' /></a>"
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
for line in lines:
|
| 24 |
+
line = line.strip()
|
| 25 |
+
if "==" in line:
|
| 26 |
+
library, version = line.split("==")
|
| 27 |
+
data.append(
|
| 28 |
+
{
|
| 29 |
+
"Library": library,
|
| 30 |
+
"Recommended Version": version,
|
| 31 |
+
"Current Version": pypi(library),
|
| 32 |
+
}
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
df = pd.DataFrame(data)
|
| 36 |
+
|
| 37 |
+
return df
|
app/tabs.py
CHANGED
|
@@ -13,6 +13,7 @@ from app.description_steps import STEP_1, STEP_2
|
|
| 13 |
from app.mbti_description import MBTI_DESCRIPTION, MBTI_DATA
|
| 14 |
from app.app import APP
|
| 15 |
from app.authors import AUTHORS
|
|
|
|
| 16 |
from app.config import config_data
|
| 17 |
from app.practical_tasks import supported_practical_tasks
|
| 18 |
from app.utils import read_csv_file, extract_profession_weights
|
|
@@ -649,3 +650,14 @@ def about_app_tab():
|
|
| 649 |
|
| 650 |
def about_authors_tab():
|
| 651 |
return gr.HTML(value=AUTHORS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
from app.mbti_description import MBTI_DESCRIPTION, MBTI_DATA
|
| 14 |
from app.app import APP
|
| 15 |
from app.authors import AUTHORS
|
| 16 |
+
from app.requirements_app import read_requirements_to_df
|
| 17 |
from app.config import config_data
|
| 18 |
from app.practical_tasks import supported_practical_tasks
|
| 19 |
from app.utils import read_csv_file, extract_profession_weights
|
|
|
|
| 650 |
|
| 651 |
def about_authors_tab():
|
| 652 |
return gr.HTML(value=AUTHORS)
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
def requirements_app_tab():
|
| 656 |
+
requirements_df = read_requirements_to_df()
|
| 657 |
+
|
| 658 |
+
return dataframe(
|
| 659 |
+
headers=requirements_df.columns.tolist(),
|
| 660 |
+
values=requirements_df.values.tolist(),
|
| 661 |
+
visible=True,
|
| 662 |
+
elem_classes="requirements-dataframe",
|
| 663 |
+
)
|
config.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
[AppSettings]
|
| 2 |
-
APP_VERSION = "0.8.
|
| 3 |
CSS_PATH = "app.css"
|
| 4 |
|
| 5 |
[InformationMessages]
|
|
@@ -34,6 +34,7 @@ NOTI_CALCULATE = "You can calculate Big Five personality traits scores"
|
|
| 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"
|
|
@@ -59,6 +60,7 @@ NOTE_MBTI_LABEL = "Note: What are Personality Types of MBTI?"
|
|
| 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"
|
|
|
|
| 1 |
[AppSettings]
|
| 2 |
+
APP_VERSION = "0.8.6"
|
| 3 |
CSS_PATH = "app.css"
|
| 4 |
|
| 5 |
[InformationMessages]
|
|
|
|
| 34 |
APP_LABEL = ["⭐ App", "⭐ Приложение"]
|
| 35 |
ABOUT_APP_LABEL = ["💡 About the App", "💡 О приложении"]
|
| 36 |
ABOUT_AUTHORS_LABEL = ["🎭 About the Authors", "🎭 Об авторах"]
|
| 37 |
+
REQUIREMENTS_LABEL = ["📋 Requirements", "📋 Зависимости"]
|
| 38 |
PRACTICAL_TASKS_LABEL = "Practical tasks"
|
| 39 |
PRACTICAL_SUBTASKS_LABEL = "Practical subtasks"
|
| 40 |
THRESHOLD_MBTI_LABEL = "Polarity traits threshold"
|
|
|
|
| 60 |
"⭐ App" = "app_tab"
|
| 61 |
"💡 About the App" = "about_app_tab"
|
| 62 |
"🎭 About the Authors" = "about_authors_tab"
|
| 63 |
+
"📋 Requirements" = "requirements_app_tab"
|
| 64 |
|
| 65 |
[Filenames]
|
| 66 |
PT_SCORES = "personality_traits_scores.csv"
|