JustinLin610 commited on
Commit
57b52e7
1 Parent(s): 0c80503

update ckpt

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -24,8 +24,8 @@ import gradio as gr
24
  # Register refcoco task
25
  tasks.register_task('ocr', OcrTask)
26
 
27
- os.system('wget http://xc-models.oss-cn-zhangjiakou.aliyuncs.com/ofa/chinese/ocr/general/checkpoint_last.pt; '
28
- 'mkdir -p checkpoints; mv checkpoint_last.pt checkpoints/ocr.pt')
29
 
30
  # turn on cuda if GPU is available
31
  use_cuda = torch.cuda.is_available()
@@ -112,8 +112,8 @@ def patch_resize_transform(patch_image_size=480, is_document=False):
112
 
113
 
114
  reader = ReaderLite()
115
- overrides={"eval_cider":False, "beam":8, "max_len_b":128, "patch_image_size":480,
116
- "orig_patch_image_size":224, "no_repeat_ngram_size":0, "seed":7}
117
  models, cfg, task = checkpoint_utils.load_model_ensemble_and_task(
118
  utils.split_paths('checkpoints/ocr.pt'),
119
  arg_overrides=overrides
 
24
  # Register refcoco task
25
  tasks.register_task('ocr', OcrTask)
26
 
27
+ os.system('wget https://shuangqing-multimodal.oss-cn-zhangjiakou.aliyuncs.com/ocr_general.pt; '
28
+ 'mkdir -p checkpoints; mv ocr_general.pt checkpoints/ocr.pt')
29
 
30
  # turn on cuda if GPU is available
31
  use_cuda = torch.cuda.is_available()
 
112
 
113
 
114
  reader = ReaderLite()
115
+ overrides={"eval_cider": False, "beam": 8, "max_len_b": 128, "patch_image_size": 480,
116
+ "orig_patch_image_size": 224, "no_repeat_ngram_size": 0, "seed": 7}
117
  models, cfg, task = checkpoint_utils.load_model_ensemble_and_task(
118
  utils.split_paths('checkpoints/ocr.pt'),
119
  arg_overrides=overrides