Alexander Bagus commited on
Commit
2486fc0
·
1 Parent(s): bc817e0
Files changed (2) hide show
  1. app.py +3 -3
  2. 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 =='Midas':
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=["HED", "Canny", "Midas", "MLSD", "Pose"],
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/bird_canny.png", "A hummingbird, standing upright on a branch, looking directly at the viewer, high-detail feathers, soft studio lighting."],
4
- ["examples/hed.jpg", "A middle-aged man with a short beard, wearing a casual button-down shirt, sitting at a polished dark wooden table, holding a tumbler of whiskey with ice and taking a thoughtful sip. The background is a softly lit."],
5
- ["examples/depth.jpg", "An industrial-style corridor featuring a minimalist table and a sleek sofa, with exposed brick walls and concrete flooring, bathed in natural light from large windows."],
6
- ["examples/pose.jpg", "A beautiful female paladin, with long flowing blonde hair, stands defiantly in a full suit of gleaming silver plate armor, a holy symbol emblazoned on her shield, in a dramatic graphic novel art style with bold lines and strong chiaroscuro."],
7
- ["examples/pose2.jpg", "A fit, athletic young woman, squatting low, glancing confidently at the camera. She's on a picturesque tropical beach with gentle waves lapping the shore. The image has the crisp, high-contrast look of a fashion magazine cover. Dynamic pose, bright and inviting."]
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
  }