Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ if IN_SPACES:
|
|
49 |
shell=True,
|
50 |
)
|
51 |
|
52 |
-
|
53 |
tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream-next")
|
54 |
moondream = AutoModelForCausalLM.from_pretrained(
|
55 |
"vikhyatk/moondream-next",
|
@@ -57,7 +57,6 @@ moondream = AutoModelForCausalLM.from_pretrained(
|
|
57 |
torch_dtype=torch.float16,
|
58 |
device_map={"": "cuda"},
|
59 |
attn_implementation="flash_attention_2",
|
60 |
-
token=auth_token if IN_SPACES else None,
|
61 |
)
|
62 |
|
63 |
# CKPT_DIRS = ["/tmp/md-ckpt/ckpt/ft/song-moon-4c-s15/s72001/"]
|
|
|
49 |
shell=True,
|
50 |
)
|
51 |
|
52 |
+
os.environ["HF_TOKEN"] = os.environ.get("TOKEN_FROM_SECRET") or True
|
53 |
tokenizer = AutoTokenizer.from_pretrained("vikhyatk/moondream-next")
|
54 |
moondream = AutoModelForCausalLM.from_pretrained(
|
55 |
"vikhyatk/moondream-next",
|
|
|
57 |
torch_dtype=torch.float16,
|
58 |
device_map={"": "cuda"},
|
59 |
attn_implementation="flash_attention_2",
|
|
|
60 |
)
|
61 |
|
62 |
# CKPT_DIRS = ["/tmp/md-ckpt/ckpt/ft/song-moon-4c-s15/s72001/"]
|