File size: 1,306 Bytes
bd97c62
3bbce21
bd97c62
3bbce21
 
6657a5d
 
3bbce21
8b2681c
bd97c62
3bbce21
 
 
 
a3d3a25
6657a5d
3bbce21
 
 
6657a5d
 
3bbce21
 
 
a3d3a25
3bbce21
 
 
 
 
 
 
 
a3d3a25
 
3bbce21
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
import gradio as gr
import jax

print(f"JAX devices: {jax.devices()}")
print(f"JAX device type: {jax.devices()[0].device_kind}")

def infer_charred(prompt):
    # your inference function for charr stable difusion control
    return None


with gr.Blocks(theme="gradio/soft") as demo:

    gr.Markdown("# Character-Aware Stable Diffusion (CHARRED)")

    with gr.Tab("Journal"):
        gr.Markdown(
            "## On How Four Crazy Fellow Embarked on Training a U-Net from Scratch in Five Days and Almost Died in the End."
        )

    with gr.Tab("☢️ DEMO ☢️"):
        gr.Markdown(
            "## This is a demo of the CHARRED character-aware stable diffusion model for you to enjoy at your own leisure, risk and peril"
        )
        prompt_input_charr = gr.Textbox(label="Prompt")
        charred_output = gr.Image(label="Output Image")
        submit_btn = gr.Button(value="Submit")
        charred_inputs = [prompt_input_charr]
        submit_btn.click(
            fn=infer_charred, inputs=charred_inputs, outputs=[charred_output]
        )
    # examples = [["postage stamp from california", "low quality", "charr_output.png", "charr_output.png" ]]
    # gr.Examples(fn = infer_sd, inputs = ["text", "text", "image", "image"], examples=examples, cache_examples=True)


demo.launch()