warshanks commited on
Commit
0514194
·
verified ·
1 Parent(s): f05f590

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -19,13 +19,13 @@ import subprocess
19
  subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
20
 
21
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
22
- "lingshu-medical-mllm/Lingshu-32B",
23
  torch_dtype=torch.bfloat16,
24
  attn_implementation="flash_attention_2",
25
  device_map="auto",
26
  )
27
 
28
- processor = AutoProcessor.from_pretrained("lingshu-medical-mllm/Lingshu-32B")
29
 
30
 
31
  MAX_NUM_IMAGES = int(os.getenv("MAX_NUM_IMAGES", "5"))
@@ -216,7 +216,7 @@ def run(message: dict, history: list[dict], system_prompt: str = "", max_new_tok
216
 
217
 
218
  DESCRIPTION = """\
219
- This is a demo of Lingshu 32B, a multimodal model trained for performance on medical text and image comprehension.
220
  Lingshu supports more than 12 medical imaging modalities, including X-Ray, CT Scan, MRI, Microscopy, Ultrasound, Histopathology, Dermoscopy, Fundus, OCT, Digital Photography, Endoscopy, and PET.
221
  """
222
 
@@ -231,7 +231,7 @@ demo = gr.ChatInterface(
231
  gr.Slider(label="Max New Tokens", minimum=100, maximum=8192, step=10, value=2048),
232
  ],
233
  stop_btn=False,
234
- title="Lingshu 32B",
235
  description=DESCRIPTION,
236
  run_examples_on_click=False,
237
  cache_examples=False,
 
19
  subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
20
 
21
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
22
+ "lingshu-medical-mllm/Lingshu-7B",
23
  torch_dtype=torch.bfloat16,
24
  attn_implementation="flash_attention_2",
25
  device_map="auto",
26
  )
27
 
28
+ processor = AutoProcessor.from_pretrained("lingshu-medical-mllm/Lingshu-7B")
29
 
30
 
31
  MAX_NUM_IMAGES = int(os.getenv("MAX_NUM_IMAGES", "5"))
 
216
 
217
 
218
  DESCRIPTION = """\
219
+ This is a demo of Lingshu 7B, a multimodal model trained for performance on medical text and image comprehension.
220
  Lingshu supports more than 12 medical imaging modalities, including X-Ray, CT Scan, MRI, Microscopy, Ultrasound, Histopathology, Dermoscopy, Fundus, OCT, Digital Photography, Endoscopy, and PET.
221
  """
222
 
 
231
  gr.Slider(label="Max New Tokens", minimum=100, maximum=8192, step=10, value=2048),
232
  ],
233
  stop_btn=False,
234
+ title="Lingshu 7B",
235
  description=DESCRIPTION,
236
  run_examples_on_click=False,
237
  cache_examples=False,