xinlongwang commited on
Commit
5f4cbf4
1 Parent(s): 022f833
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -18,7 +18,8 @@ def inference_mask1(prompt,
18
  "img" : resizeImg(img),
19
  "img_" : resizeImg(img_)
20
  }
21
- r = requests.post("https://flagstudio.baai.ac.cn/painter/run", json = files)
 
22
  a = json.loads(r.text)
23
  res = []
24
  for i in range(len(a)):
@@ -57,7 +58,7 @@ examples = [
57
  ]
58
 
59
  demo_mask = gr.Interface(fn=inference_mask1,
60
- inputs=[gr.ImageMask(label="prompt (提示图)"), gr.Image(label="img1 (测试图1)"), gr.Image(label="img2 (测试图2)")],
61
  #outputs=[gr.Image(shape=(448, 448), label="output1 (输出图1)"), gr.Image(shape=(448, 448), label="output2 (输出图2)")],
62
  outputs=[gr.Image(label="output1 (输出图1)").style(height=384, width=384), gr.Image(label="output2 (输出图2)").style(height=384, width=384)],
63
  #outputs=gr.Gallery(label="outputs (输出图)"),
 
18
  "img" : resizeImg(img),
19
  "img_" : resizeImg(img_)
20
  }
21
+ #r = requests.post("https://flagstudio.baai.ac.cn/painter/run", json = files)
22
+ r = requests.post("http://120.92.79.209/painter/run", json = files)
23
  a = json.loads(r.text)
24
  res = []
25
  for i in range(len(a)):
 
58
  ]
59
 
60
  demo_mask = gr.Interface(fn=inference_mask1,
61
+ inputs=[gr.ImageMask(brush_radius=5, label="prompt (提示图)"), gr.Image(label="img1 (测试图1)"), gr.Image(label="img2 (测试图2)")],
62
  #outputs=[gr.Image(shape=(448, 448), label="output1 (输出图1)"), gr.Image(shape=(448, 448), label="output2 (输出图2)")],
63
  outputs=[gr.Image(label="output1 (输出图1)").style(height=384, width=384), gr.Image(label="output2 (输出图2)").style(height=384, width=384)],
64
  #outputs=gr.Gallery(label="outputs (输出图)"),