Spaces:
No application file
No application file
Create App.py
Browse files1234567891011121314151617181920212223242526272829303132333435import gradio as grfrom PIL import Image, ImageDrawimport random
def generate_image(prompt): img = Image.new("RGB", (768, 768), color=(20, 20, 30)) draw = ImageDraw.Draw(img)
colors = [ (255, 0, 140), (125, 44, 255), (0, 255, 200), (255, 120, 0) ]
for i in range(30): x1 = random.randint(0, 768) y1 = random.randint(0, 768) x2 = random.randint(0, 768) y2 = random.randint(0, 768) draw.rectangle([x1, y1, x2, y2], outline=random.choice(colors), width=3)
draw.text((30, 30), prompt, fill=(255,255,255))
return img
demo = gr.Interface( fn=generate_image, inputs="text", outputs="image", title="Squirt4Daddy AI Generator", description="AI creator image generator demo")
demo.launch()App.pyAdded+35