Spaces:
Runtime error
Runtime error
Download app.py from bardou/cute-logo-creator: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/spaces/bardou/cute-logo-creator/resolve/refs%2Fpr%2F1/app.py
- Command line
-
hf download hf://spaces/bardou/cute-logo-creator@refs/pr/1/app.py
-
curl -L -o app.py https://huggingface.co/spaces/bardou/cute-logo-creator/resolve/refs%2Fpr%2F1/app.py
643 Bytes
| 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() | |