Spaces:
Runtime error
Runtime error
import gradio as gr | |
def generate_image(prompt): | |
return f"Image would be generated based on: {prompt}" | |
examples = [ | |
"A beautiful sunset over a calm ocean", | |
"A futuristic cityscape with flying cars", | |
"A serene forest scene with a babbling brook", | |
"An abstract representation of love with swirling colors", | |
"A cat playing with a ball of yarn in a cozy living room", | |
"A majestic mountain range under a starry night sky", | |
"A bustling farmer's market with colorful produce", | |
"A steampunk-inspired clockwork mechanism", | |
"A tranquil Japanese garden with a koi pond", | |
"A whimsical treehouse in an enchanted forest" | |
] | |
demo = gr.Interface( | |
fn=generate_image, | |
inputs=gr.Textbox(placeholder="Enter your prompt here", label="Image Prompt"), | |
outputs=gr.Textbox(label="Generated Image Description"), | |
title="FLUX.1 [dev] Image Generation Interface", | |
description="Enter a text prompt to generate an image. (Note: This is a demo interface and doesn't actually generate images)", | |
examples=examples, | |
theme=gr.themes.Soft() | |
) | |
demo.launch() |