dalle3 / app.py
Kvikontent's picture
Update app.py
4f90a2d
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.")