-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
75 lines (62 loc) · 2.3 KB
/
main.py
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
71
72
73
74
75
#We import libraries to use them in this file
import streamlit as st
import pandas as pd
from streamlit_option_menu import option_menu
from multiprocessing import Value
from pages.main import tabs as tf
from PIL import Image
st.set_page_config(
page_title="Vocado",
page_icon="🥑",
layout="wide",
menu_items = {
'Get Help': 'https://github.com/HenryLABFinalGrupo02/trabajofinal',
'Report a bug': "https://github.com/HenryLABFinalGrupo02/trabajofinal",
'About': "# This is a header. This is an *VOCADO* cool app!"})
with open('style.css') as f:
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
################
###### MENU ######
################
with st.sidebar:
st.image(Image.open('./image/logo_vocado.png'))
selected = option_menu(None, ["Home", "My Business", "Competition", "Opportunities", "Add business"],
icons=['house', 'building', 'globe', 'star', 'plus'],
menu_icon="cast", default_index=0, orientation="vertical",
styles={
"container": {"padding": "0!important",
"background-color": "#E4FFED"},
"icon": {"color": "#F4C01E",
"font-size": "25px"},
"nav-link": {"font-size": "25px",
"margin":"0px",
"--hover-color": "#109138",
"font-family":"Sans-serif",
"background-color": "#E4FFED"},
"nav-link-selected": {"background-color": "#109138",
"font-style":"Sans-serif",
"font-weight": "bold",
"color":"#FFFFFF"},
})
#####################
## IMPORT FUNCTIONS ##
#####################
## HOME
if selected == "Home":
st.title('Welcome to Vocado Admin Center')
tf.metricas()
## My Business
if selected == "My Business":
st.title('Business Admin Center')
tf.select_business()
## My Competition
if selected == "Competition":
st.title('Competition')
tf.timeseries()
## My Opportunities
if selected == "Opportunities":
st.title('Opportunities Exploration')
tf.machine_learning()
## Add Business
if selected == "Add business":
tf.addbusiness()