Spaces:
Runtime error
Runtime error
JustinLin610
commited on
Merge remote-tracking branch 'origin/main'
Browse files
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.
|
30 |
-
|
|
|
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()
|