File size: 1,140 Bytes
0852a2d
 
 
 
 
 
 
 
 
 
0b252a2
 
 
 
 
 
0852a2d
 
0b252a2
0852a2d
 
c00c978
0852a2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
37
38
39
import gradio as gr

def band():
    # Load the model
    model = gr.load("models/alvdansen/BandW-Manga")

    # Define the function to generate images
    def generate_image(prompt):
        # Use the model to generate an image from the prompt
        return model(prompt)


    your = gr.themes.Soft(
    primary_hue="blue",
    secondary_hue="orange")

    
    # Create the Gradio interface
    with gr.Blocks(theme=your) as demo:
        # Title and description
        gr.Markdown("# BandW-Manga")
        gr.Markdown(f"spaces version of BandW-Manga by @[alvdansen](https://huggingface.co/alvdansen/BandW-Manga).")

        # Input and output components
        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")

        # Define the interactions
        generate_button.click(fn=generate_image, inputs=prompt, outputs=output_image)

    return demo

# Launch the interface
band().launch()