Repository navigation
Expand file tree
/
Copy pathapp.py
More file actions
47 lines (36 loc) · 1.46 KB
/
Copy pathapp.py
File metadata and controls
47 lines (36 loc) · 1.46 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
import logging
from PIL import Image
import streamlit as st
from utils.menu import menu
# Logs
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def run():
"""
Run app - homepage
:return:
"""
icon = Image.open('static/icons/logo.ico')
st.set_page_config(page_title="ElabLite",
layout="wide",
initial_sidebar_state="expanded",
page_icon=icon,
menu_items={
'About': 'https://github.com/CRC-Centre-Recherche-Conservation/ElabLite',
'Report a bug': "https://github.com/CRC-Centre-Recherche-Conservation/ElabLite/issues/new?assignees=rayondemiel&labels=bug&projects=CRC-Centre-Recherche-Conservation%2F3&template=BUG-REPORT.yml&title=%5BBug%5D%3A+"
}
)
st.title(f"ElabLite")
st.write(
"Welcome to ElabLite like metadata generator! This tool helps you generate metadata for use in your elabFTW instance with easy templates.")
# init step metadata
if "step_metadata" not in st.session_state:
st.session_state["step_metadata"] = "step_metadata_base"
if 'validation_error' not in st.session_state:
st.session_state.validation_error = True
if 'selected_template' not in st.session_state:
st.session_state.selected_template = None
# SIDEBAR
menu()
if __name__ == "__main__":
run()