Spaces:
Runtime error
Runtime error
Merge branch 'main' of https://huggingface.co/spaces/anas-awadalla/test
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="togethercomputer/RedPajama-INCITE-
|
| 56 |
-
tokenizer_path="togethercomputer/RedPajama-INCITE-
|
| 57 |
cross_attn_every_n_layers=2,
|
| 58 |
)
|
| 59 |
|
| 60 |
-
checkpoint_path = hf_hub_download("openflamingo/OpenFlamingo-4B-vitl-rpj3b
|
| 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-Base-3B-v1",
|
| 56 |
+
tokenizer_path="togethercomputer/RedPajama-INCITE-Base-3B-v1",
|
| 57 |
cross_attn_every_n_layers=2,
|
| 58 |
)
|
| 59 |
|
| 60 |
+
checkpoint_path = hf_hub_download("openflamingo/OpenFlamingo-4B-vitl-rpj3b", "checkpoint.pt")
|
| 61 |
model.load_state_dict(torch.load(checkpoint_path), strict=False)
|
| 62 |
|
| 63 |
model.eval()
|