KeerthiVM commited on
Commit
e3ef848
·
1 Parent(s): 7040ac6
Files changed (1) hide show
  1. SkinGPT.py +5 -8
SkinGPT.py CHANGED
@@ -232,8 +232,6 @@ class SkinGPT4(nn.Module):
232
  def generate(self, images, user_input=None, max_new_tokens=300):
233
 
234
  image_embeds = self.encode_image(images)
235
- image_embeds_1 = self.encode_image(images)
236
- print(f"Embeddings match: {torch.allclose(image_embeds, image_embeds_1, atol=1e-5)}")
237
 
238
  print(f"Aligned features : {image_embeds}")
239
  # print(f"\n Images embeddings shape : {image_embeds.shape} \n Llama config hidden size : {self.llama.config.hidden_size}")
@@ -249,12 +247,11 @@ class SkinGPT4(nn.Module):
249
  )
250
 
251
 
252
- prompt = (
253
- "### Instruction: <Img><IMAGE></Img> "
254
- "Could you describe the skin condition in this image? "
255
- "Please provide a detailed analysis including possible diagnoses. "
256
- "### Response:"
257
- )
258
 
259
  # prompt = """### Skin Diagnosis Analysis ###
260
  # <IMAGE>
 
232
  def generate(self, images, user_input=None, max_new_tokens=300):
233
 
234
  image_embeds = self.encode_image(images)
 
 
235
 
236
  print(f"Aligned features : {image_embeds}")
237
  # print(f"\n Images embeddings shape : {image_embeds.shape} \n Llama config hidden size : {self.llama.config.hidden_size}")
 
247
  )
248
 
249
 
250
+ prompt = """"### Instruction: <Img><IMAGE></Img>
251
+ Could you describe the skin condition in this image?
252
+ Please provide a detailed analysis including possible diagnoses.
253
+ ### Response:
254
+ """
 
255
 
256
  # prompt = """### Skin Diagnosis Analysis ###
257
  # <IMAGE>