Update app.py
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ def encode_image(image_path):
|
|
| 60 |
|
| 61 |
#Get the projection model
|
| 62 |
img_proj_head = _MLPVectorProjector(512, 2560, 1, 4).to("cpu")
|
| 63 |
-
img_proj_head.load_state_dict(torch.load('projection_finetuned.pth'))
|
| 64 |
|
| 65 |
#Get the fine-tuned phi-2 model
|
| 66 |
phi2_finetuned = AutoModelForCausalLM.from_pretrained(
|
|
|
|
| 60 |
|
| 61 |
#Get the projection model
|
| 62 |
img_proj_head = _MLPVectorProjector(512, 2560, 1, 4).to("cpu")
|
| 63 |
+
img_proj_head.load_state_dict(torch.load('projection_finetuned.pth', map_location=torch.device('cpu')))
|
| 64 |
|
| 65 |
#Get the fine-tuned phi-2 model
|
| 66 |
phi2_finetuned = AutoModelForCausalLM.from_pretrained(
|