File size: 433 Bytes
a38a82a
e6514b2
 
 
cf2baf5
e6514b2
cf2baf5
e6514b2
ba0ed52
e6514b2
00641c3
e6514b2
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import streamlit as st
from freeGPT import Client
from PIL import Image
from io import BytesIO

st.title("Stable Diffusion SDXL-Turbo")

model = st.sidebar.selectbox("Choose Model", ("prodia", "pollinations"))

prompt = st.text_input("Prompt", "")

try:
    resp = Client.create_generation(model, prompt)
    image = Image.open(BytesIO(resp))
    st.image(image, caption="Generated Image")
except Exception as e:
    st.error(str(e))