Thiago Hersan commited on
Commit
eaff1be
1 Parent(s): 1462d79

remove flagging. init with invisible outputs

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -23,7 +23,7 @@ landmark_detector = cv2.face.createFacemarkLBF()
23
  landmark_detector.loadModel(LBFmodel)
24
 
25
  NUM_OUTS = 16
26
- all_outputs = [gr.Image(format="jpeg") for _ in range(NUM_OUTS)]
27
 
28
  def face(img_in):
29
  out_pad = NUM_OUTS * [gr.Image(visible=False)]
@@ -86,7 +86,8 @@ with gr.Blocks() as demo:
86
  inputs=gr.Image(type="pil"),
87
  outputs=all_outputs,
88
  cache_examples=True,
89
- examples=[["./imgs/03.webp"], ["./imgs/11.jpg"]]
 
90
  )
91
 
92
  if __name__ == "__main__":
 
23
  landmark_detector.loadModel(LBFmodel)
24
 
25
  NUM_OUTS = 16
26
+ all_outputs = [gr.Image(format="jpeg", visible=False) for _ in range(NUM_OUTS)]
27
 
28
  def face(img_in):
29
  out_pad = NUM_OUTS * [gr.Image(visible=False)]
 
86
  inputs=gr.Image(type="pil"),
87
  outputs=all_outputs,
88
  cache_examples=True,
89
+ examples=[["./imgs/03.webp"], ["./imgs/11.jpg"]],
90
+ allow_flagging="never",
91
  )
92
 
93
  if __name__ == "__main__":