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