osanseviero HF staff commited on
Commit
be6293d
1 Parent(s): 4351c18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -7,9 +7,13 @@ import re
7
  from magma import Magma
8
  from magma.image_input import ImageInput
9
 
 
 
 
 
10
  model = Magma.from_checkpoint(
11
  config_path = "configs/MAGMA_v1.yml",
12
- checkpoint_path = "./mp_rank_00_model_states.pt",
13
  device = 'cuda:0'
14
  )
15
 
 
7
  from magma import Magma
8
  from magma.image_input import ImageInput
9
 
10
+ from huggingface_hub import hf_hub_download
11
+ checkpoint_path = hf_hub_download(repo_id="osanseviero/magma", filename="model.pt")
12
+
13
+
14
  model = Magma.from_checkpoint(
15
  config_path = "configs/MAGMA_v1.yml",
16
+ checkpoint_path = checkpoint_path,
17
  device = 'cuda:0'
18
  )
19