Spaces:
Runtime error
Runtime error
JustinLin610
commited on
Commit
•
803e48e
1
Parent(s):
8f7f77a
debug
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ os.system('wget https://shuangqing-multimodal.oss-cn-zhangjiakou.aliyuncs.com/oc
|
|
30 |
# turn on cuda if GPU is available
|
31 |
use_cuda = torch.cuda.is_available()
|
32 |
# use fp16 only when GPU is available
|
33 |
-
use_fp16 =
|
34 |
|
35 |
mean = [0.5, 0.5, 0.5]
|
36 |
std = [0.5, 0.5, 0.5]
|
@@ -112,7 +112,7 @@ def patch_resize_transform(patch_image_size=480, is_document=False):
|
|
112 |
return _patch_resize_transform
|
113 |
|
114 |
|
115 |
-
reader = ReaderLite()
|
116 |
overrides={"eval_cider": False, "beam": 4, "max_len_b": 32, "patch_image_size": 480,
|
117 |
"orig_patch_image_size": 224, "no_repeat_ngram_size": 0, "seed": 7}
|
118 |
models, cfg, task = checkpoint_utils.load_model_ensemble_and_task(
|
|
|
30 |
# turn on cuda if GPU is available
|
31 |
use_cuda = torch.cuda.is_available()
|
32 |
# use fp16 only when GPU is available
|
33 |
+
use_fp16 = True
|
34 |
|
35 |
mean = [0.5, 0.5, 0.5]
|
36 |
std = [0.5, 0.5, 0.5]
|
|
|
112 |
return _patch_resize_transform
|
113 |
|
114 |
|
115 |
+
reader = ReaderLite(gpu=True)
|
116 |
overrides={"eval_cider": False, "beam": 4, "max_len_b": 32, "patch_image_size": 480,
|
117 |
"orig_patch_image_size": 224, "no_repeat_ngram_size": 0, "seed": 7}
|
118 |
models, cfg, task = checkpoint_utils.load_model_ensemble_and_task(
|