scdrand23 commited on
Commit
67ab029
·
1 Parent(s): 274d219

reset to biomedparse+biomedllama_3b_multimodal

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -152,9 +152,9 @@ def extract_modality_and_prompts(llm_output):
152
  'retina': 'Fundus',
153
  'endoscop': 'Endoscopy',
154
  'colon': 'Endoscopy',
155
- 'patholog': 'Pathology',
156
- 'tissue': 'Pathology',
157
- 'histolog': 'Pathology',
158
  'x-ray': 'X-Ray-Chest',
159
  'xray': 'X-Ray-Chest',
160
  'chest radiograph': 'X-Ray-Chest',
@@ -362,7 +362,7 @@ def process_image(image_path, user_prompt, modality=None):
362
  # Add color legend with more natural language
363
  # detailed_analysis += "\n\n As shown in the images outputs details:\n \n" + "\n".join(color_descriptions)
364
 
365
- analysis_prompt = f"Give the modality, organ, analysis, abnormalities (if any), treatment (if abnormalities are present) for this image. Focus more on the user question. which is: {user_prompt}"
366
  msgs = [{'role': 'user', 'content': [pil_image, analysis_prompt]}]
367
 
368
  for new_text in llm_model.chat(
 
152
  'retina': 'Fundus',
153
  'endoscop': 'Endoscopy',
154
  'colon': 'Endoscopy',
155
+ 'pathological': 'Pathology',
156
+ # 'tissue': 'Pathology',
157
+ # 'histolog': 'Pathology',
158
  'x-ray': 'X-Ray-Chest',
159
  'xray': 'X-Ray-Chest',
160
  'chest radiograph': 'X-Ray-Chest',
 
362
  # Add color legend with more natural language
363
  # detailed_analysis += "\n\n As shown in the images outputs details:\n \n" + "\n".join(color_descriptions)
364
 
365
+ analysis_prompt = f"Focus more on the user question. which is: {user_prompt}. Give the modality, organ, analysis, abnormalities (if any), treatment (if abnormalities are present) for this image. "
366
  msgs = [{'role': 'user', 'content': [pil_image, analysis_prompt]}]
367
 
368
  for new_text in llm_model.chat(