File size: 1,075 Bytes
770b4c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30571af
 
770b4c1
30571af
8d52e3d
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")
        input_image = gr.Image(label="Input Image")
        output_image = gr.Image(label="Output Image")
        submit_btn = gr.Button(value = "Submit")
        sd_inputs = [prompt_input_txt, negative_prompt_txt, input_image]
        submit_btn.click(fn=inference_fun, inputs=sd_inputs, outputs=[output_image])
    #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()