Linahosnaparty's picture
Create app.py
ee09cda verified
raw
history blame contribute delete
708 Bytes
import gradio as gr
def generate_cookie_image(cookie_name):
# Your AI image generation logic goes here
# You can replace this with your actual image generation code
# For now, let's assume you have a function that generates an image based on the cookie name
generated_image = generate_image_from_cookie_name(cookie_name)
return generated_image
image_component = gr.Image(type="pil") # Specify the image type as PIL
# Create the Gradio interface
demo = gr.Interface(
fn=generate_cookie_image,
inputs=image_component,
outputs="image", # Display the generated image
examples=["path/to/cookie_image.jpg"], # Provide example images
)
# Launch the interface
demo.launch()