h-siyuan commited on
Commit
3b0c073
·
verified ·
1 Parent(s): 750d1c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ MAX_PIXELS = 1344 * 28 * 28
34
  # file_path = hf_hub_download(repo_id=model_repo, filename=file, local_dir=destination_folder)
35
  # print(f"Downloaded {file} to {file_path}")
36
 
37
- global model = Qwen2VLForConditionalGeneration.from_pretrained(
38
  # "./showui-2b",
39
  "showlab/ShowUI-2B",
40
  torch_dtype=torch.bfloat16,
@@ -42,7 +42,7 @@ global model = Qwen2VLForConditionalGeneration.from_pretrained(
42
  )
43
 
44
  # Load the processor
45
- global processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", min_pixels=MIN_PIXELS, max_pixels=MAX_PIXELS)
46
 
47
  # Helper functions
48
  def draw_point(image_input, point=None, radius=5):
 
34
  # file_path = hf_hub_download(repo_id=model_repo, filename=file, local_dir=destination_folder)
35
  # print(f"Downloaded {file} to {file_path}")
36
 
37
+ model = Qwen2VLForConditionalGeneration.from_pretrained(
38
  # "./showui-2b",
39
  "showlab/ShowUI-2B",
40
  torch_dtype=torch.bfloat16,
 
42
  )
43
 
44
  # Load the processor
45
+ processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", min_pixels=MIN_PIXELS, max_pixels=MAX_PIXELS)
46
 
47
  # Helper functions
48
  def draw_point(image_input, point=None, radius=5):