JustinLin610 commited on
Commit
a303e9f
2 Parent(s): 085ecd3 ce9da00

Merge remote-tracking branch 'origin/main'

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import os
2
-
3
  import pandas as pd
4
 
5
  os.system('cd fairseq;'
@@ -26,8 +25,9 @@ import gradio as gr
26
  # Register refcoco task
27
  tasks.register_task('ocr', OcrTask)
28
 
29
- os.system('wget https://shuangqing-multimodal.oss-cn-zhangjiakou.aliyuncs.com/ocr_general_clean.pt; '
30
- 'mkdir -p checkpoints; mv ocr_general_clean.pt checkpoints/ocr_general_clean.pt')
 
31
 
32
  # turn on cuda if GPU is available
33
  use_cuda = torch.cuda.is_available()
 
1
  import os
 
2
  import pandas as pd
3
 
4
  os.system('cd fairseq;'
 
25
  # Register refcoco task
26
  tasks.register_task('ocr', OcrTask)
27
 
28
+ if not os.path.exists("checkpoints/ocr_general_clean.pt"):
29
+ os.system('wget https://shuangqing-multimodal.oss-cn-zhangjiakou.aliyuncs.com/ocr_general_clean.pt; '
30
+ 'mkdir -p checkpoints; mv ocr_general_clean.pt checkpoints/ocr_general_clean.pt')
31
 
32
  # turn on cuda if GPU is available
33
  use_cuda = torch.cuda.is_available()