Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
2486fc0
1
Parent(s):
bc817e0
22
Browse files- app.py +3 -3
- static/data.json +5 -5
app.py
CHANGED
|
@@ -107,7 +107,7 @@ def inference(
|
|
| 107 |
processor_id = 'canny'
|
| 108 |
if control_mode == 'HED':
|
| 109 |
processor_id = 'softedge_hed'
|
| 110 |
-
if control_mode =='
|
| 111 |
processor_id = 'depth_midas'
|
| 112 |
if control_mode =='MLSD':
|
| 113 |
processor_id = 'mlsd'
|
|
@@ -184,7 +184,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 184 |
)
|
| 185 |
|
| 186 |
control_mode = gr.Radio(
|
| 187 |
-
choices=["
|
| 188 |
value="HED",
|
| 189 |
label="Control Mode"
|
| 190 |
)
|
|
@@ -240,7 +240,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 240 |
step=1,
|
| 241 |
value=8,
|
| 242 |
)
|
| 243 |
-
gr.Examples(examples=examples, inputs=[input_image, prompt])
|
| 244 |
gr.HTML(read_file("static/footer.html"))
|
| 245 |
|
| 246 |
run_button.click(
|
|
|
|
| 107 |
processor_id = 'canny'
|
| 108 |
if control_mode == 'HED':
|
| 109 |
processor_id = 'softedge_hed'
|
| 110 |
+
if control_mode =='Depth':
|
| 111 |
processor_id = 'depth_midas'
|
| 112 |
if control_mode =='MLSD':
|
| 113 |
processor_id = 'mlsd'
|
|
|
|
| 184 |
)
|
| 185 |
|
| 186 |
control_mode = gr.Radio(
|
| 187 |
+
choices=["Canny", "Depth", "HED", "MLSD", "Pose"],
|
| 188 |
value="HED",
|
| 189 |
label="Control Mode"
|
| 190 |
)
|
|
|
|
| 240 |
step=1,
|
| 241 |
value=8,
|
| 242 |
)
|
| 243 |
+
gr.Examples(examples=examples, inputs=[input_image, prompt, control_mode])
|
| 244 |
gr.HTML(read_file("static/footer.html"))
|
| 245 |
|
| 246 |
run_button.click(
|
static/data.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"examples": [
|
| 3 |
-
["examples/
|
| 4 |
-
["examples/
|
| 5 |
-
["examples/
|
| 6 |
-
["examples/
|
| 7 |
-
["examples/pose2.jpg", "A fit, athletic young woman
|
| 8 |
]
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"examples": [
|
| 3 |
+
["examples/pose1.jpg", "A female paladin.", "Pose"],
|
| 4 |
+
["examples/bird.png", "A bird sitting on a branch", "Canny"],
|
| 5 |
+
["examples/bottle.png", "A man holding glass", "HED"],
|
| 6 |
+
["examples/room.png", "modern architecture, living room", "Depth"],
|
| 7 |
+
["examples/pose2.jpg", "A fit, athletic young woman. beach background", "Pose"]
|
| 8 |
]
|
| 9 |
}
|