Spaces:
Runtime error
Runtime error
import streamlit as st | |
from screen_add_note import screen_add_main | |
from screen_scan import screen_scan_main | |
from screen_note import screen_note_main | |
from streamlit_option_menu import option_menu | |
def local_css(file_name): | |
with open(file_name) as f: | |
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True) | |
local_css("style.css") | |
def streamlit_menu(example=3): | |
if example == 3: | |
# 2. horizontal menu with custom style | |
selected = option_menu( | |
menu_title=None, # required | |
options=["Optik Okuma", "Yeni Not Girisi", "Not Goruntuleme"], # required | |
icons=["house", "book", "envelope"], | |
default_index=0, # optional | |
orientation="horizontal", | |
styles={ | |
"container": {"padding": "0!important", "background-color": "#b2d8d8"}, | |
"icon": {"color": "orange", "font-size": "0px"}, | |
"nav-link": { | |
"font-size": "15px", | |
"text-align": "left", | |
"margin": "0px", | |
"--hover-color": "#eee", | |
}, | |
"nav-link-selected": {"background-color": "#008080"}, | |
}, | |
) | |
return selected | |
def main(): | |
selected = streamlit_menu(example=3) | |
if selected == "Optik Okuma": | |
screen_scan_main() | |
if selected == "Yeni Not Girisi": | |
screen_add_main() | |
if selected == "Not Goruntuleme": | |
screen_note_main() | |
if __name__ == "__main__": | |
main() | |