Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -261,8 +261,7 @@ st.markdown("### 🖼️ Visualizing Your Design Concept")
|
|
261 |
if st.button("Generate Concept Image from Design Summary"):
|
262 |
with st.spinner("Creating a personalized visual..."):
|
263 |
|
264 |
-
refined_prompt = f"""
|
265 |
-
Based on the following tiny home project details:
|
266 |
|
267 |
Region: {design_region}
|
268 |
Style: {design_style}
|
@@ -285,8 +284,12 @@ Focus on realistic materials, lighting, and color palette. Use a 3D rendering st
|
|
285 |
st.image(concept_image_url, caption="Generated Concept Image", use_column_width=True)
|
286 |
st.markdown(f"[Download Image]({concept_image_url})", unsafe_allow_html=True)
|
287 |
|
288 |
-
# Store this
|
289 |
-
st.
|
|
|
|
|
|
|
|
|
290 |
|
291 |
|
292 |
|
|
|
261 |
if st.button("Generate Concept Image from Design Summary"):
|
262 |
with st.spinner("Creating a personalized visual..."):
|
263 |
|
264 |
+
refined_prompt = f"""Based on the following tiny home project details:
|
|
|
265 |
|
266 |
Region: {design_region}
|
267 |
Style: {design_style}
|
|
|
284 |
st.image(concept_image_url, caption="Generated Concept Image", use_column_width=True)
|
285 |
st.markdown(f"[Download Image]({concept_image_url})", unsafe_allow_html=True)
|
286 |
|
287 |
+
# Store this in session state (optional for later use)
|
288 |
+
st.session_state.generated_concept_image_url = concept_image_url
|
289 |
+
|
290 |
+
except Exception as e:
|
291 |
+
st.error(f"Image generation failed: {e}")
|
292 |
+
|
293 |
|
294 |
|
295 |
|