Spaces:
Runtime error
Runtime error
File size: 643 Bytes
ed21143 a388239 |
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 28 29 30 31 32 33 34 35 36 |
import gradio as gr
from diffusers import DiffusionPipeline
KEYWORDS = [
"cute",
"small",
"cartoon",
]
PIPELINE = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
PIPELINE.load_lora_weights("artificialguybr/LogoRedmond-LogoLoraForSDXL-V2")
def predict(user_prompt: str):
prompt = ", ".join(KEYWORDS)
if user_prompt:
prompt += ", " + user_prompt
return PIPELINE(prompt).images[0]
gradio_app = gr.Interface(
predict,
inputs=[
gr.Textbox(),
],
outputs=[gr.Image()],
title="Cute Logo Creator",
)
if __name__ == "__main__":
gradio_app.launch()
|