|
import gradio as gr |
|
|
|
def band(): |
|
|
|
model = gr.load("models/alvdansen/BandW-Manga") |
|
|
|
|
|
def generate_image(prompt): |
|
|
|
return model(prompt) |
|
|
|
|
|
with gr.Blocks() as demo: |
|
|
|
gr.Markdown("# BandW-Manga") |
|
gr.Markdown(f"spaces version of BandW-Manga by @[alvdansen](https://huggingface.co/alvdansen/BandW-Manga).") |
|
|
|
|
|
with gr.Row(): |
|
with gr.Column(): |
|
prompt = gr.Textbox(label="Prompt", placeholder="Enter your text prompt here...") |
|
generate_button = gr.Button("Generate") |
|
with gr.Column(): |
|
output_image = gr.Image(label="Generated Image") |
|
|
|
|
|
generate_button.click(fn=generate_image, inputs=prompt, outputs=output_image) |
|
|
|
return demo |
|
|
|
|
|
band().launch() |
|
|