Yixin1234 commited on
Commit
03171ce
·
1 Parent(s): f9f96cf

fix the @spaces.GPU

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -46,7 +46,7 @@ def describe_image(image, user_question="Describe this image in great detail."):
46
  ).to('cpu')
47
 
48
  # Load and prepare the model
49
- vl_gpt = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True).to(torch.bfloat16).cuda().eval()
50
 
51
  # Generate embeddings from the image input
52
  inputs_embeds = vl_gpt.prepare_inputs_embeds(**prepare_inputs)
 
46
  ).to('cpu')
47
 
48
  # Load and prepare the model
49
+ vl_gpt = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True).to(torch.bfloat16).cpu().eval()
50
 
51
  # Generate embeddings from the image input
52
  inputs_embeds = vl_gpt.prepare_inputs_embeds(**prepare_inputs)