-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.py
24 lines (23 loc) · 843 Bytes
/
app.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
import sys
sys.path.append("./src")
import streamlit as st
from app_pages import button_interface, step_by_step_generation, one_click_generation, homepage
from app_pages.locale import _
from utils.hash import check_env, check_embedding
if __name__ == "__main__":
check_env()
check_embedding()
backend = button_interface.Backend()
# backend = None
st.set_page_config(layout="wide")
# st.logo("./assets/pic/logo.jpg", size="large")
def fn1():
one_click_generation.one_click_generation(backend)
def fn2():
step_by_step_generation.step_by_step_generation(backend)
pg = st.navigation([
st.Page(homepage.home_page, title=_("🏠️ Homepage")),
st.Page(fn1, title=_("💧 One-click Generation")),
st.Page(fn2, title=_("💦 Step-by-step Generation")),
])
pg.run()