Spaces:
Running
Running
File size: 580 Bytes
9d1b8e4 576381a 9d1b8e4 576381a f6f44a7 576381a f6f44a7 d709633 576381a d709633 f6f44a7 576381a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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() |