lihuigu
commited on
Commit
·
fe93e75
1
Parent(s):
e17c9f2
upload app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import sys
|
| 2 |
+
import os
|
| 3 |
+
sys.path.append("./src")
|
| 4 |
+
import streamlit as st
|
| 5 |
+
from pages import button_interface, step_by_step_generation, one_click_generation
|
| 6 |
+
from utils.hash import check_env
|
| 7 |
+
|
| 8 |
+
if __name__ == "__main__":
|
| 9 |
+
check_env()
|
| 10 |
+
backend = button_interface.Backend()
|
| 11 |
+
st.set_page_config(layout="wide")
|
| 12 |
+
def fn1():
|
| 13 |
+
one_click_generation.one_click_generation(backend)
|
| 14 |
+
def fn2():
|
| 15 |
+
step_by_step_generation.step_by_step_generation(backend)
|
| 16 |
+
pg = st.navigation([
|
| 17 |
+
st.Page(fn1, title="💧 One-click Generation"),
|
| 18 |
+
st.Page(fn2, title="💦 Step-by-step Generation"),
|
| 19 |
+
])
|
| 20 |
+
pg.run()
|