import streamlit as st from diffusers import DiffusionPipeline from PIL import Image # Modeli yükle pipe = DiffusionPipeline.from_pretrained("PRAMAY3000/floor-plan-generation") # Streamlit arayüzü st.title("Floor Plan Generator") st.write("Create a floor plan based on your description!") # Kullanıcıdan girdi alın prompt = st.text_input("Enter the description for the floor plan:", "2 rooms one living room architectural floor plan draw") if st.button("Generate Floor Plan"): # Görüntü oluştur image = pipe(prompt).images[0] # Görüntüyü göster st.image(image, caption="Generated Floor Plan", use_column_width=True) # Görüntüyü kaydetme image_path = "generated_floor_plan.png" image.save(image_path) # Kullanıcıya dosya indirme linki sağla st.download_button( label="Download Floor Plan", data=open(image_path, "rb").read(), file_name=image_path, mime="image/png" )