CoolFace
Apppublic

maximalmargin/katz

sourceHugging Facecc-by-sa-4.0updated 4y agoView on Hugging Face
0likes
app.py28 linesDownload Raw Back to root
1import gradio as gr2from PIL import Image  3from diffusers import StableDiffusionPipeline4 5 6katz_model_path = 'maximalmargin/katz'7katz = StableDiffusionPipeline.from_pretrained(katz_model_path)8 9 10def predict(text):11    image = katz(prompt = text).images[0]12    return [image]13 14gallery = gr.Gallery(15    label="Generated images", show_label=False, elem_id="gallery"16).style(height="auto")17 18gr.Interface(19    predict,20    inputs=gr.Textbox(21                        label="Enter your prompt",22                        show_label=False,23                        max_lines=1,24                        placeholder="Enter your prompt",25                    ),26    outputs=[gallery],27    title="Alex Katz Portraiter",28).launch()