zdou0830 commited on
Commit
5732a50
1 Parent(s): 3c3d474
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -80,8 +80,9 @@ def predict(image, text, specified_tokens=""):
80
  specified_tokens = None
81
  else:
82
  specified_tokens = specified_tokens.strip().split(";")
83
- result, _ = glip_demo.run_on_web_image(image[:, :, [2, 1, 0]], text, 0.5, specified_tokens)
84
- fiber_result, _ = fiber_demo.run_on_web_image(image[:, :, [2, 1, 0]], text, 0.5, specified_tokens)
 
85
  return result[:, :, [2, 1, 0]], fiber_result[:, :, [2, 1, 0]]
86
 
87
 
 
80
  specified_tokens = None
81
  else:
82
  specified_tokens = specified_tokens.strip().split(";")
83
+ from copy import deepcopy
84
+ result, _ = glip_demo.run_on_web_image(deepcopy(image[:, :, [2, 1, 0]]), text, 0.5, specified_tokens)
85
+ fiber_result, _ = fiber_demo.run_on_web_image(deepcopy(image[:, :, [2, 1, 0]]), text, 0.5, specified_tokens)
86
  return result[:, :, [2, 1, 0]], fiber_result[:, :, [2, 1, 0]]
87
 
88