vikhyatk commited on
Commit
594fde7
Β·
verified Β·
1 Parent(s): 9272205

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -51,7 +51,7 @@ if IN_SPACES:
51
  shell=True,
52
  )
53
 
54
- auth_token = os.environ.get("TOKEN_FROM_SECRET") or True
55
  tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream-next")
56
  moondream = AutoModelForCausalLM.from_pretrained(
57
  "vikhyatk/moondream-next",
@@ -59,7 +59,6 @@ moondream = AutoModelForCausalLM.from_pretrained(
59
  torch_dtype=torch.float16,
60
  device_map={"": "cuda"},
61
  attn_implementation="flash_attention_2",
62
- token=auth_token if IN_SPACES else None,
63
  )
64
 
65
  # CKPT_DIRS = ["/tmp/md-ckpt/ckpt/ft/song-moon-4c-s15/s72001/"]
 
51
  shell=True,
52
  )
53
 
54
+ process.env.HF_TOKEN = os.environ.get("TOKEN_FROM_SECRET") or True
55
  tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream-next")
56
  moondream = AutoModelForCausalLM.from_pretrained(
57
  "vikhyatk/moondream-next",
 
59
  torch_dtype=torch.float16,
60
  device_map={"": "cuda"},
61
  attn_implementation="flash_attention_2",
 
62
  )
63
 
64
  # CKPT_DIRS = ["/tmp/md-ckpt/ckpt/ft/song-moon-4c-s15/s72001/"]