haotiz commited on
Commit
ecb4718
1 Parent(s): d68ec7e

fix bug for rgb channel

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,8 +44,8 @@ glip_demo = GLIPDemo(
44
 
45
 
46
  def predict(image, text):
47
- result, _ = glip_demo.run_on_web_image(image, text, 0.5)
48
- return result
49
 
50
 
51
  image = gr.inputs.Image()
 
44
 
45
 
46
  def predict(image, text):
47
+ result, _ = glip_demo.run_on_web_image(image[:, :, [2, 1, 0]], text, 0.5)
48
+ return result[:, :, [2, 1, 0]]
49
 
50
 
51
  image = gr.inputs.Image()