Spaces:
Runtime error
Runtime error
anas-awadalla
commited on
Commit
•
444a3af
1
Parent(s):
16bae00
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="anas-awadalla/mpt-1b-redpajama-200b-dolly",
|
58 |
+
tokenizer_path="anas-awadalla/mpt-1b-redpajama-200b-dolly",
|
59 |
+
cross_attn_every_n_layers=1,
|
60 |
)
|
61 |
|
62 |
+
checkpoint_path = hf_hub_download("openflamingo/OpenFlamingo-3B-vitl-mpt1b-langinstruct", "checkpoint.pt")
|
63 |
model.load_state_dict(torch.load(checkpoint_path), strict=False)
|
64 |
|
65 |
model.eval()
|