Spaces:
Runtime error
Runtime error
fiber
Browse files
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 |
-
|
| 84 |
-
|
|
|
|
| 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 |
|