-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
48 lines (40 loc) · 1.4 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
import os
import sys
import streamlit as st
from pathlib import Path
import page1,page2,page3
from streamlit_option_menu import option_menu
st.set_page_config(
page_title="YOLO",
layout="wide"
)
class MultiApp:
def __init__(self):
self.apps = []
def add_app(self, title, function):
self.apps.append({
"title": title,
"function": function
})
def run():
st.sidebar.image(['logo_.jpg'], width=220,)
with st.sidebar:
app = option_menu(
menu_title="page_names",
options=['IMAGE','VIDEO','URL LINKS'],
icons=['cloud-upload-fill','compass-fill','binoculars-fill'],
menu_icon='chat-text-fill',
default_index=1,
styles={
"container": {"padding": "5!important","background-color":'#ff6666'},
"icon": {"color": "white", "font-size": "23px"},
"nav-link": {"color":"white","font-size": "20px", "text-align": "left", "margin":"0px", "--hover-color": "blue"},
"nav-link-selected": {"background-color": "black"},}
)
if app == "IMAGE":
page1.app()
if app == "VIDEO":
page2.app()
if app == "URL LINKS":
page3.app()
run()