File size: 1,058 Bytes
770b4c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr
title = "Control Net for Media Pipe Hand tracking"
description = "This is a demo of a Media pipe hand tracking"
def inference_fun(prompt, negative_prompt, image):
    # your inference code goes here
    return None



with gr.Blocks(theme='gradio/soft') as demo:
    gr.Markdown("## Control Net for Media Pipe Hand tracking")


        
    with gr.Tab("Stable Diffusion"):
        prompt_input_txt = gr.Textbox(label="Prompt")
        negative_prompt_txt = gr.Textbox(label="Negative Prompt")
        sd_input = gr.Image(label="Input Image")
        sd_output = gr.Image(label="Output Image")
        submit_btn = gr.Button(value = "Submit")
        sd_inputs = [prompt_input_seg, negative_prompt_seg, sd_input]
        submit_btn.click(fn=infer_sd, inputs=sd_inputs, outputs=[sd_output])
    #examples = [["a woman is making an ok sign in front of a painting", "low quality", "val_1.png", "val_2.png" ]]
    #gr.Examples(fn = infer_sd, inputs = ["text", "text", "image", "image"], examples=examples, cache_examples=True)


demo.launch()