-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
70 lines (62 loc) · 2.23 KB
/
main.py
File metadata and controls
70 lines (62 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import streamlit as st
from test2text.pages.documentation import show_documentation
from test2text.pages.upload.annotations import show_annotations
from test2text.pages.upload.requirements import show_requirements
from test2text.pages.reports.report_by_req import make_a_report
from test2text.pages.reports.report_by_tc import make_a_tc_report
from test2text.services.visualisation.visualize_vectors import visualize_vectors
from test2text.pages.controls.controls_page import controls_page
def add_logo():
st.markdown(
"""
<style>
[data-testid="stSidebarNav"] {
background-image: url();
background-repeat: no-repeat;
padding-top: 10px;
background-position: 20px 20px;
}
[data-testid="stSidebarNav"]::before {
content: "📑 Test2Text";
margin-left: 20px;
margin-top: 20px;
font-size: 30px;
position: relative;
top: 0px;
}
</style>
""",
unsafe_allow_html=True,
)
if __name__ == "__main__":
st.set_page_config(
page_title="Test2Text App", layout="wide", initial_sidebar_state="auto"
)
add_logo()
about = st.Page(
show_documentation, title="About application", icon=":material/info:"
)
annotations = st.Page(
show_annotations, title="Annotations", icon=":material/database_upload:"
)
requirements = st.Page(
show_requirements, title="Requirements", icon=":material/database_upload:"
)
cache_distances = st.Page(controls_page, title="Controls", icon=":material/cached:")
report_by_req = st.Page(
make_a_report, title="Requirement's Report", icon=":material/publish:"
)
report_by_tc = st.Page(
make_a_tc_report, title="Test cases Report", icon=":material/publish:"
)
visualization = st.Page(
visualize_vectors, title="Visualize Vectors", icon=":material/dataset:"
)
pages = {
"Home": [about],
"Upload": [annotations, requirements],
"Update": [cache_distances],
"Inspect": [report_by_req, report_by_tc, visualization],
}
pg = st.navigation(pages)
pg.run()