Spaces:
Runtime error
Runtime error
Commit
·
d25e2be
1
Parent(s):
0a405ca
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="anas-awadalla/mpt-
|
| 58 |
-
tokenizer_path="anas-awadalla/mpt-
|
| 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-7b",
|
| 58 |
+
tokenizer_path="anas-awadalla/mpt-7b",
|
| 59 |
+
cross_attn_every_n_layers=4,
|
| 60 |
)
|
| 61 |
|
| 62 |
+
checkpoint_path = hf_hub_download("openflamingo/OpenFlamingo-9B-vitl-mpt7b", "checkpoint.pt")
|
| 63 |
model.load_state_dict(torch.load(checkpoint_path), strict=False)
|
| 64 |
|
| 65 |
model.eval()
|