File size: 861 Bytes
e6ff184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr
from transformers import pipeline

# Load the model from Hugging Face using the pipeline
logo_pipeline = pipeline(model="Shakker-Labs/FLUX.1-dev-LoRA-Logo-Design")

# Function to generate logo from the prompt
def generate_logo(prompt):
    image = logo_pipeline(prompt)
    return image

# Gradio interface using Blocks
with gr.Blocks() as demo:
    gr.Markdown("## Logo Generator with Shakker-Labs/FLUX.1-dev-LoRA-Logo-Design")
    
    with gr.Row():
        with gr.Column():
            prompt = gr.Textbox(label="Logo Prompt", placeholder="Describe the logo you want to create...")
            submit_btn = gr.Button("Generate Logo")
        with gr.Column():
            output_image = gr.Image(label="Generated Logo")

    submit_btn.click(fn=generate_logo, inputs=prompt, outputs=output_image)

# Launch the Gradio app
demo.launch()