Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
scriptgen = st.Page("scriptgen.py", title= "Script Generator", default= True)
|
| 4 |
+
imggen = st.Page("imggen.py", title= "Image Generator")
|
| 5 |
+
tweaker = st.Page("tweaker.py", title= "Creative Consultant")
|
| 6 |
+
|
| 7 |
+
# Sidebar for API Key input and options
|
| 8 |
+
with st.sidebar:
|
| 9 |
+
# Retrieve API Key from Streamlit secrets or prompt for input
|
| 10 |
+
replicate_api = st.secrets.get("REPLICATE_API_TOKEN", None)
|
| 11 |
+
if replicate_api:
|
| 12 |
+
st.success("API Key found in secrets!")
|
| 13 |
+
else:
|
| 14 |
+
replicate_api = st.text_input("Enter your API Key: ", type="password")
|
| 15 |
+
|
| 16 |
+
pg = st.navigation(
|
| 17 |
+
{
|
| 18 |
+
"": [scriptgen, imggen, tweaker]
|
| 19 |
+
}
|
| 20 |
+
)
|
| 21 |
+
pg.run()
|