nevreal commited on
Commit
e6ff184
1 Parent(s): 6492132

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ # Load the model from Hugging Face using the pipeline
5
+ logo_pipeline = pipeline(model="Shakker-Labs/FLUX.1-dev-LoRA-Logo-Design")
6
+
7
+ # Function to generate logo from the prompt
8
+ def generate_logo(prompt):
9
+ image = logo_pipeline(prompt)
10
+ return image
11
+
12
+ # Gradio interface using Blocks
13
+ with gr.Blocks() as demo:
14
+ gr.Markdown("## Logo Generator with Shakker-Labs/FLUX.1-dev-LoRA-Logo-Design")
15
+
16
+ with gr.Row():
17
+ with gr.Column():
18
+ prompt = gr.Textbox(label="Logo Prompt", placeholder="Describe the logo you want to create...")
19
+ submit_btn = gr.Button("Generate Logo")
20
+ with gr.Column():
21
+ output_image = gr.Image(label="Generated Logo")
22
+
23
+ submit_btn.click(fn=generate_logo, inputs=prompt, outputs=output_image)
24
+
25
+ # Launch the Gradio app
26
+ demo.launch()