LPDoctor commited on
Commit
b64ac21
1 Parent(s): 93d0a00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -255,10 +255,10 @@ def inference_single_image(ref_image,
255
  def run_local(base,
256
  ref,
257
  *args):
258
- print("base文件:",base)
259
- print("base文件背景图:", base["background"])
260
- print("base文件层次图:", base["layers"])
261
- print("参考图:", ref)
262
  image = base["background"].convert("RGB") #base["image"].convert("RGB")
263
  mask = base["layers"][0] #base["mask"].convert("L")
264
 
@@ -318,12 +318,12 @@ with gr.Blocks() as demo:
318
 
319
  with gr.Row():
320
  base = gr.ImageEditor( label="Source",
321
- type="filepath",
322
  brush=gr.Brush(colors=["#FFFFFF"],default_size = 30,color_mode = "fixed"),
323
  layers = False,
324
  interactive=True
325
  )
326
- ref = gr.Image(label="Reference", sources="upload", type="filepath", height=512)
327
  run_local_button = gr.Button(value="Run")
328
 
329
 
 
255
  def run_local(base,
256
  ref,
257
  *args):
258
+ # print("base文件:",base)
259
+ # print("base文件背景图:", base["background"])
260
+ # print("base文件层次图:", base["layers"])
261
+ # print("参考图:", ref)
262
  image = base["background"].convert("RGB") #base["image"].convert("RGB")
263
  mask = base["layers"][0] #base["mask"].convert("L")
264
 
 
318
 
319
  with gr.Row():
320
  base = gr.ImageEditor( label="Source",
321
+ type="pil",
322
  brush=gr.Brush(colors=["#FFFFFF"],default_size = 30,color_mode = "fixed"),
323
  layers = False,
324
  interactive=True
325
  )
326
+ ref = gr.Image(label="Reference", sources="upload", type="pil", height=512)
327
  run_local_button = gr.Button(value="Run")
328
 
329