wifix199's picture
Update app.py
576381a verified
raw
history blame
580 Bytes
import gradio as gr
from transformers import Flux1
# Load the model
model = Flux1.from_pretrained("black-forest-labs/flux-1-dev")
def generate_image(prompt):
# Generate an image using the model
image = model(prompt)
return image
# Create the Gradio Interface
demo = gr.Interface(
fn=generate_image,
inputs=gr.Textbox(label="Prompt"),
outputs=gr.Image(label="Generated Image"),
title="FLUX.1-dev Image Generation Bot",
description="Enter a prompt and generate an image using the FLUX.1-dev model."
)
# Launch the Gradio Interface
demo.launch()