-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
44 lines (32 loc) · 909 Bytes
/
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
import streamlit as st
import model.detection as detection
from app.about_app import __about_app__
from app.run_on_image import __run_on_image__
from app.run_on_video import __run_on_video__
from app.utils import sidebar_html
def main():
"""
Face Detection App with Streamlit
"""
st.markdown(
sidebar_html,
unsafe_allow_html=True,
)
st.sidebar.title("Opcoes")
st.sidebar.subheader("Parametros")
about_app, run_on_image, run_on_video = (
"Sobre o app",
"Rodar em imagem",
"Rodar em video",
)
app_mode = st.sidebar.selectbox(
"Selecione uma opcao", [about_app, run_on_image, run_on_video]
)
if app_mode == about_app:
__about_app__()
elif app_mode == run_on_video:
__run_on_video__()
elif app_mode == run_on_image:
__run_on_image__()
if __name__ == "__main__":
main()