Spaces:
Sleeping

File size: 565 Bytes
f04146a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import streamlit as st
from diffusers import DiffusionPipeline

# Load the diffusion model
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")

# Streamlit UI
st.title("Personal Image Generator")

# Input prompt for generating images
prompt = st.text_input("Enter your prompt", "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k")

# Generate the image on button click
if st.button("Generate Image"):
    with st.spinner("Generating image..."):
        image = pipe(prompt).images[0]
        st.image(image, caption=prompt)