Create app.py
Browse files12345678910111213141516171819202122import gradio as grfrom transformers import pipeline
# Text-to-image pipeline initialize karnapipe = pipeline("text-to-image-generation", model="dalle-mini/dalle-mini")
def generate_image(text): # Text se image generate karna result = pipe(text) return result[0]["generated_image"]
# Gradio Interface bananaiface = gr.Interface( fn=generate_image, inputs="text", outputs="image", title="Text-to-Image Generator", description="Enter a description, and this AI will generate an image based on it.")
# Launch the appiface.launch()app.pyAdded+22