Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -49,6 +49,8 @@ def construct_transform(patch_image_size):
|
|
49 |
tasks.register_task('caption', CaptionTask)
|
50 |
tasks.register_task('refcoco', RefcocoTask)
|
51 |
tasks.register_task('vqa_gen', VqaGenTask)
|
|
|
|
|
52 |
# turn on cuda if GPU is available
|
53 |
use_cuda = torch.cuda.is_available()
|
54 |
# use fp16 only when GPU is available
|
@@ -62,6 +64,7 @@ os.system('wget https://ofa-silicon.oss-us-west-1.aliyuncs.com/checkpoints/refco
|
|
62 |
os.system('wget https://ofa-silicon.oss-us-west-1.aliyuncs.com/checkpoints/general_demo.pt; '
|
63 |
'mkdir -p checkpoints; mv general_demo.pt checkpoints/general_demo.pt')
|
64 |
|
|
|
65 |
# Load ckpt & config for Image Captioning
|
66 |
caption_overrides = {"bpe_dir": "utils/BPE", "eval_cider": False, "beam": 5,
|
67 |
"max_len_b": 16, "no_repeat_ngram_size": 3, "seed": 7}
|
|
|
49 |
tasks.register_task('caption', CaptionTask)
|
50 |
tasks.register_task('refcoco', RefcocoTask)
|
51 |
tasks.register_task('vqa_gen', VqaGenTask)
|
52 |
+
tasks.register_task('snli_ve', SnliVeTask)
|
53 |
+
|
54 |
# turn on cuda if GPU is available
|
55 |
use_cuda = torch.cuda.is_available()
|
56 |
# use fp16 only when GPU is available
|
|
|
64 |
os.system('wget https://ofa-silicon.oss-us-west-1.aliyuncs.com/checkpoints/general_demo.pt; '
|
65 |
'mkdir -p checkpoints; mv general_demo.pt checkpoints/general_demo.pt')
|
66 |
|
67 |
+
|
68 |
# Load ckpt & config for Image Captioning
|
69 |
caption_overrides = {"bpe_dir": "utils/BPE", "eval_cider": False, "beam": 5,
|
70 |
"max_len_b": 16, "no_repeat_ngram_size": 3, "seed": 7}
|