sd-sdxl-turbo / app.py
Kvikontent's picture
Update app.py
1c3f7cb
raw
history blame
No virus
560 Bytes
import streamlit as st
from freeGPT import Client
from PIL import Image
from io import BytesIO
st.sidebar.title("Stable Diffusion SDXL-Turbo", help="Made with API")
st.sidebar.subheader("By KVI Kontent")
st.sidebar.write("Choose model and enter prompt")
model = st.sidebar.selectbox("Choose Model", ("prodia", "pollinations"))
prompt = st.sidebar.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))