Spaces:
Runtime error
Runtime error
import streamlit as st | |
from diffusers import DiffusionPipeline | |
pipeline = DiffusionPipeline.from_pretrained("dataautogpt3/OpenDalleV1.1") | |
prompt = st.text_area("Enter your prompt here:") | |
button = st.button("Generate Image") | |
if button: | |
if prompt != '': | |
image = pipeline.generate(prompt=prompt) | |
st.image(image, caption=f"Generated image from prompt: {prompt}") | |
else: | |
st.error("Please enter a prompt before generating an image.") | |