Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -3
src/streamlit_app.py
CHANGED
|
@@ -14,7 +14,7 @@ from cloudhands import CloudHandsPayment
|
|
| 14 |
import uuid
|
| 15 |
|
| 16 |
|
| 17 |
-
payment_key=os.getenv
|
| 18 |
def load_local_lottie(path):
|
| 19 |
with open(path, 'r') as file:
|
| 20 |
return json.load(file)
|
|
@@ -75,7 +75,7 @@ if "token" not in st.session_state:
|
|
| 75 |
|
| 76 |
# ✅ Show loading animation only once at first load
|
| 77 |
if st.session_state.loading_state:
|
| 78 |
-
with st_lottie_spinner(load_local_lottie('Abstract Painting Loader.json'), key='hello'):
|
| 79 |
time.sleep(5)
|
| 80 |
st.session_state.loading_state = False
|
| 81 |
st.title("Old Book Image Generator")
|
|
@@ -92,7 +92,7 @@ book_title = books[books.index(books)]
|
|
| 92 |
if st.button("Generate Image") and caption:
|
| 93 |
|
| 94 |
|
| 95 |
-
with st_lottie_spinner(load_local_lottie('Circle brush.json'), key='loading'):
|
| 96 |
# Example: Using Replicate's Stable Diffusion API (replace with your own API key and endpoint)
|
| 97 |
payload = {
|
| 98 |
"image_description": caption,
|
|
|
|
| 14 |
import uuid
|
| 15 |
|
| 16 |
|
| 17 |
+
payment_key=os.getenv('Payment_Key')
|
| 18 |
def load_local_lottie(path):
|
| 19 |
with open(path, 'r') as file:
|
| 20 |
return json.load(file)
|
|
|
|
| 75 |
|
| 76 |
# ✅ Show loading animation only once at first load
|
| 77 |
if st.session_state.loading_state:
|
| 78 |
+
with st_lottie_spinner(load_local_lottie('./src/Abstract Painting Loader.json'), key='hello'):
|
| 79 |
time.sleep(5)
|
| 80 |
st.session_state.loading_state = False
|
| 81 |
st.title("Old Book Image Generator")
|
|
|
|
| 92 |
if st.button("Generate Image") and caption:
|
| 93 |
|
| 94 |
|
| 95 |
+
with st_lottie_spinner(load_local_lottie('./src/Circle brush.json'), key='loading'):
|
| 96 |
# Example: Using Replicate's Stable Diffusion API (replace with your own API key and endpoint)
|
| 97 |
payload = {
|
| 98 |
"image_description": caption,
|