Spaces:
Runtime error
Runtime error
Commit
·
16bae00
1
Parent(s):
7357314
Update app.py
Browse files
app.py
CHANGED
@@ -54,12 +54,12 @@ with open("bad_words.txt", "r") as f:
|
|
54 |
model, image_processor, tokenizer = create_model_and_transforms(
|
55 |
clip_vision_encoder_pretrained="openai",
|
56 |
clip_vision_encoder_path="ViT-L-14",
|
57 |
-
lang_encoder_path="
|
58 |
-
tokenizer_path="
|
59 |
-
cross_attn_every_n_layers=
|
60 |
)
|
61 |
|
62 |
-
checkpoint_path = hf_hub_download("openflamingo/OpenFlamingo-
|
63 |
model.load_state_dict(torch.load(checkpoint_path), strict=False)
|
64 |
|
65 |
model.eval()
|
|
|
54 |
model, image_processor, tokenizer = create_model_and_transforms(
|
55 |
clip_vision_encoder_pretrained="openai",
|
56 |
clip_vision_encoder_path="ViT-L-14",
|
57 |
+
lang_encoder_path="togethercomputer/RedPajama-INCITE-Instruct-3B-v1",
|
58 |
+
tokenizer_path="togethercomputer/RedPajama-INCITE-Instruct-3B-v1",
|
59 |
+
cross_attn_every_n_layers=2,
|
60 |
)
|
61 |
|
62 |
+
checkpoint_path = hf_hub_download("openflamingo/OpenFlamingo-4B-vitl-rpj3b-langinstruct", "checkpoint.pt")
|
63 |
model.load_state_dict(torch.load(checkpoint_path), strict=False)
|
64 |
|
65 |
model.eval()
|