weepakistan commited on
Commit
4620b02
1 Parent(s): fa988fd

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +44 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gradio_client import Client
3
+
4
+ client = Client("stabilityai/stable-diffusion-3-medium")
5
+
6
+ def generate_logo(prompt):
7
+ """Generates a logo using the provided prompt."""
8
+
9
+ result = client.predict(
10
+ prompt=prompt,
11
+ negative_prompt="",
12
+ seed=0,
13
+ randomize_seed=True,
14
+ width=1024,
15
+ height=1024,
16
+ guidance_scale=7,
17
+ num_inference_steps=50,
18
+ api_name="/infer"
19
+ )
20
+ return result[0]
21
+
22
+ # Define example prompts
23
+ examples = [
24
+ "Logo for a restaurant named 'Haandi'",
25
+ "Modern tech company logo named 'InnoTech'",
26
+ "Vintage coffee shop logo for 'Brewed Bliss'",
27
+ "Luxury hotel logo named 'Regal Stay'",
28
+ "Minimalist yoga studio logo called 'Zen Space'",
29
+ "Colorful bakery logo for 'Sweet Treats'",
30
+ "Elegant fashion brand logo for 'Chic Couture'",
31
+ "Rustic farm-to-table restaurant logo 'Harvest Moon'",
32
+ "Bold sports team logo for 'Thunderbolts'",
33
+ "Playful children's toy store logo 'Toy Land'",
34
+ ]
35
+
36
+ # Define the Gradio interface
37
+ iface = gr.Interface(
38
+ fn=generate_logo,
39
+ inputs=gr.Textbox(label="Describe your logo idea"),
40
+ outputs=gr.Image(label="Generated Logo"),
41
+ examples=examples
42
+ )
43
+
44
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio_client
2
+ gradio