ToletiSri commited on
Commit
004680a
1 Parent(s): 70f3d32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -59,13 +59,13 @@ def encode_image(image_path):
59
  return img_embedding
60
 
61
  #Get the projection model
62
- img_proj_head = _MLPVectorProjector(512, 2560, 1, 4).to("cuda")
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(
67
  "phi2_adaptor_fineTuned", trust_remote_code=True,
68
- torch_dtype = torch.float32).to("cuda")
69
 
70
 
71
  def example_inference(input_text, count): #, image, img_qn, audio):
 
59
  return img_embedding
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(
67
  "phi2_adaptor_fineTuned", trust_remote_code=True,
68
+ torch_dtype = torch.float32).to("cpu")
69
 
70
 
71
  def example_inference(input_text, count): #, image, img_qn, audio):