Spaces:
Runtime error
Runtime error
import gradio as gr | |
from gradio_client import Client | |
client = Client("stabilityai/stable-diffusion-3-medium") | |
def generate_logo(prompt): | |
"""Generates a logo using the provided prompt.""" | |
result = client.predict( | |
prompt=prompt, | |
negative_prompt="", | |
seed=0, | |
randomize_seed=True, | |
width=1024, | |
height=1024, | |
guidance_scale=7, | |
num_inference_steps=50, | |
api_name="/infer" | |
) | |
return result[0] | |
# Define example prompts | |
examples = [ | |
"Logo for a restaurant named 'Haandi'", | |
"Modern tech company logo named 'InnoTech'", | |
"Vintage coffee shop logo for 'Brewed Bliss'", | |
"Luxury hotel logo named 'Regal Stay'", | |
"Minimalist yoga studio logo called 'Zen Space'", | |
"Colorful bakery logo for 'Sweet Treats'", | |
"Elegant fashion brand logo for 'Chic Couture'", | |
"Rustic farm-to-table restaurant logo 'Harvest Moon'", | |
"Bold sports team logo for 'Thunderbolts'", | |
"Playful children's toy store logo 'Toy Land'", | |
] | |
# Define the Gradio interface | |
iface = gr.Blocks() | |
with iface: | |
gr.Markdown(""" | |
# AI Logo Maker | |
Generate free AI images with your face or any face.<br> | |
[Click here to Donate](https://nowpayments.io/donation/aheed)<br> | |
Contact me for bulk processing and more AI software at +92-332-4399819<br> | |
<b>Duplicate this space if you get error.</b> | |
""") | |
gr.Interface( | |
fn=generate_logo, | |
inputs=[ | |
gr.Textbox(label="Describe your logo idea"), | |
], | |
outputs=gr.Image(label="Generated Logo"), | |
examples=examples | |
) | |
iface.launch() |