Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -278,6 +278,30 @@ Selected Categories: {', '.join(summary['Categories'])}
|
|
278 |
file_name="design_summary.txt",
|
279 |
mime="text/plain"
|
280 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
|
283 |
|
|
|
278 |
file_name="design_summary.txt",
|
279 |
mime="text/plain"
|
280 |
)
|
281 |
+
st.markdown("### 🖼️ Visualizing Your Design Concept")
|
282 |
+
|
283 |
+
if st.button("Generate Concept Image from Design Summary"):
|
284 |
+
with st.spinner("Creating a personalized visual..."):
|
285 |
+
|
286 |
+
refined_prompt = f"""
|
287 |
+
Based on the following tiny home project details:
|
288 |
+
|
289 |
+
Region: {design_region}
|
290 |
+
Style: {design_style}
|
291 |
+
Categories: {', '.join(selected_categories)}
|
292 |
+
Design Suggestions: {design_results}
|
293 |
+
|
294 |
+
Create a professional architectural rendering that visually reflects this concept.
|
295 |
+
Focus on realistic materials, lighting, and color palette. Use a 3D rendering style with natural surroundings.
|
296 |
+
"""
|
297 |
+
|
298 |
+
try:
|
299 |
+
response = client.images.generate(
|
300 |
+
model="dall-e-3",
|
301 |
+
prompt=refined_prompt,
|
302 |
+
size="1024x1024",
|
303 |
+
quality="standard",
|
304 |
+
|
305 |
|
306 |
|
307 |
|