File size: 1,330 Bytes
197f5ec
 
 
 
 
 
 
 
 
291e05e
8a56d57
197f5ec
 
 
 
10e4a4c
197f5ec
8a56d57
10e4a4c
8a56d57
 
197f5ec
 
 
a992708
197f5ec
a992708
10e4a4c
8a56d57
 
 
 
 
 
10e4a4c
 
197f5ec
 
 
 
 
 
8a56d57
10e4a4c
 
197f5ec
 
 
 
 
403ed1b
197f5ec
291e05e
 
 
 
8a56d57
197f5ec
 
 
8a56d57
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
import streamlit as st

from src.content import (
    HERO_TEXT,
    ABOUT_TEXT,
    CITATION_LABEL,
    CITATION_TEXT,
    LICENCE_TEXT,
    INTRO_TEXT,
    METHODOLOGY_TEXT,
    SUPPORT_TEXT,
)

from src.expert import expert_mode
from src.calculator import calculator_mode
from src.token_estimator import token_estimator

st.set_page_config(layout="wide", page_title="ECOLOGITS", page_icon="💬")

with open("src/style.css") as css:
    st.markdown(f"<style>{css.read()}</style>", unsafe_allow_html=True)

st.html(HERO_TEXT)

st.markdown(INTRO_TEXT, unsafe_allow_html=True)

tab_calculator, tab_expert, tab_token, tab_method, tab_about, tab_support = st.tabs(
    [
        "🧮 Calculator",
        "🤓 Expert Mode",
        "🪙 Tokens estimator",
        "📖 Methodology",
        "ℹ️ About",
        "🩷 Support us",
    ]
)

with tab_calculator:
    calculator_mode()

with tab_expert:
    expert_mode()

with tab_token:
    token_estimator()

with tab_method:
    st.write(METHODOLOGY_TEXT)

with tab_about:
    st.markdown(ABOUT_TEXT, unsafe_allow_html=True)

with tab_support:
    st.markdown(SUPPORT_TEXT, unsafe_allow_html=True)


with st.expander("📚 Citation"):
    st.html(CITATION_LABEL)
    st.html(CITATION_TEXT)

st.html(LICENCE_TEXT)