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))