KeerthiVM commited on
Commit
9a54325
·
1 Parent(s): e3ef848
Files changed (1) hide show
  1. SkinGPT.py +13 -13
SkinGPT.py CHANGED
@@ -247,17 +247,17 @@ class SkinGPT4(nn.Module):
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>
258
  # Could you describe the skin condition in this image?
259
  # Please provide a detailed analysis including possible diagnoses.
260
- # ### Response:"""
 
 
 
 
 
 
 
261
 
262
 
263
  # print(f"\n[DEBUG] Raw Prompt:\n{prompt}")
@@ -268,12 +268,12 @@ class SkinGPT4(nn.Module):
268
  padding_side="right"
269
  )
270
  # self.tokenizer.add_special_tokens({'additional_special_tokens': ['<Img>', '</Img>', '<ImageHere>']})
271
- # num_added = self.tokenizer.add_special_tokens({
272
- # 'additional_special_tokens': ['<IMAGE>']
273
- # })
274
  num_added = self.tokenizer.add_special_tokens({
275
- 'additional_special_tokens': ['<Img>', '</Img>', '<IMAGE>']
276
  })
 
 
 
277
 
278
  if num_added == 0:
279
  raise ValueError("Failed to add <IMAGE> token!")
 
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>
258
+ Could you describe the skin condition in this image?
259
+ Please provide a detailed analysis including possible diagnoses.
260
+ ### Response:"""
261
 
262
 
263
  # print(f"\n[DEBUG] Raw Prompt:\n{prompt}")
 
268
  padding_side="right"
269
  )
270
  # self.tokenizer.add_special_tokens({'additional_special_tokens': ['<Img>', '</Img>', '<ImageHere>']})
 
 
 
271
  num_added = self.tokenizer.add_special_tokens({
272
+ 'additional_special_tokens': ['<IMAGE>']
273
  })
274
+ # num_added = self.tokenizer.add_special_tokens({
275
+ # 'additional_special_tokens': ['<Img>', '</Img>', '<IMAGE>']
276
+ # })
277
 
278
  if num_added == 0:
279
  raise ValueError("Failed to add <IMAGE> token!")