Update app.py
Browse files
app.py
CHANGED
@@ -34,14 +34,14 @@ for file in files:
|
|
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 |
torch_dtype=torch.bfloat16,
|
40 |
device_map="cpu",
|
41 |
)
|
42 |
|
43 |
# Load the processor
|
44 |
-
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", min_pixels=MIN_PIXELS, max_pixels=MAX_PIXELS)
|
45 |
|
46 |
# Helper functions
|
47 |
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 |
+
global model = Qwen2VLForConditionalGeneration.from_pretrained(
|
38 |
"./showui-2b",
|
39 |
torch_dtype=torch.bfloat16,
|
40 |
device_map="cpu",
|
41 |
)
|
42 |
|
43 |
# Load the processor
|
44 |
+
global processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", min_pixels=MIN_PIXELS, max_pixels=MAX_PIXELS)
|
45 |
|
46 |
# Helper functions
|
47 |
def draw_point(image_input, point=None, radius=5):
|