Spaces:
Runtime error
Runtime error
import gradio as gr | |
from diffusers import DiffusionPipeline | |
pipeline = DiffusionPipeline.from_pretrained("dataautogpt3/OpenDalleV1.1") | |
def generate_image(prompt): | |
if prompt != '': | |
image = pipeline.generate(prompt=prompt) | |
return image | |
else: | |
return None | |
prompt_input = gr.textbox(input_type="area", label="Enter your prompt here:", default="Visualize a scene of a burning bonfire with the word '2023' clearly visible amidst the flames. Underneath the burning text, there is another, undamaged text that reads '2024'. The image should convey a sense of transition and change, with the old year being consumed by the fire and the new year emerging triumphant.") | |
gr.Interface(generate_image, inputs=gr.inputs.Textbox(lines=5), outputs=gr.outputs.Image(label="Generated Image")).launch() | |