Spaces:
Sleeping
Sleeping
Commit
·
770b4c1
1
Parent(s):
dd5a6e3
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
title = "Control Net for Media Pipe Hand tracking"
|
3 |
+
description = "This is a demo of a Media pipe hand tracking"
|
4 |
+
def inference_fun(prompt, negative_prompt, image):
|
5 |
+
# your inference code goes here
|
6 |
+
return None
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
with gr.Blocks(theme='gradio/soft') as demo:
|
11 |
+
gr.Markdown("## Control Net for Media Pipe Hand tracking")
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
with gr.Tab("Stable Diffusion"):
|
16 |
+
prompt_input_txt = gr.Textbox(label="Prompt")
|
17 |
+
negative_prompt_txt = gr.Textbox(label="Negative Prompt")
|
18 |
+
sd_input = gr.Image(label="Input Image")
|
19 |
+
sd_output = gr.Image(label="Output Image")
|
20 |
+
submit_btn = gr.Button(value = "Submit")
|
21 |
+
sd_inputs = [prompt_input_seg, negative_prompt_seg, sd_input]
|
22 |
+
submit_btn.click(fn=infer_sd, inputs=sd_inputs, outputs=[sd_output])
|
23 |
+
#examples = [["a woman is making an ok sign in front of a painting", "low quality", "val_1.png", "val_2.png" ]]
|
24 |
+
#gr.Examples(fn = infer_sd, inputs = ["text", "text", "image", "image"], examples=examples, cache_examples=True)
|
25 |
+
|
26 |
+
|
27 |
+
demo.launch()
|