Spaces:
Running
on
Zero
Running
on
Zero
lzyhha
commited on
Commit
·
e2a1c5c
1
Parent(s):
3d2b72f
load model
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import demo_tasks
|
|
5 |
from functools import partial
|
6 |
from data.prefix_instruction import get_layout_instruction
|
7 |
from visualcloze import VisualClozeModel
|
|
|
8 |
|
9 |
|
10 |
max_grid_h = 5
|
@@ -469,6 +470,8 @@ def parse_args():
|
|
469 |
if __name__ == "__main__":
|
470 |
args = parse_args()
|
471 |
|
|
|
|
|
472 |
# Initialize model
|
473 |
model = VisualClozeModel(resolution=args.resolution, model_path=args.model_path, precision=args.precision)
|
474 |
|
|
|
5 |
from functools import partial
|
6 |
from data.prefix_instruction import get_layout_instruction
|
7 |
from visualcloze import VisualClozeModel
|
8 |
+
from huggingface_hub import snapshot_download
|
9 |
|
10 |
|
11 |
max_grid_h = 5
|
|
|
470 |
if __name__ == "__main__":
|
471 |
args = parse_args()
|
472 |
|
473 |
+
snapshot_download(repo_id="VisualCloze/VisualCloze", repo_type="model", local_dir="models")
|
474 |
+
|
475 |
# Initialize model
|
476 |
model = VisualClozeModel(resolution=args.resolution, model_path=args.model_path, precision=args.precision)
|
477 |
|