tuandunghcmut commited on
Commit
92ccacb
1 Parent(s): 717943b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from datetime import datetime
9
  import numpy as np
10
  import os
11
 
12
-
13
  # subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
14
 
15
  # models = {
@@ -33,7 +33,12 @@ def array_to_image_path(image_array):
33
  return full_path
34
 
35
  models = {
36
- "Qwen/Qwen2-VL-72B-Instruct": Qwen2VLForConditionalGeneration.from_pretrained("Qwen/Qwen2-VL-72B-Instruct", trust_remote_code=True, torch_dtype="auto").cuda().eval()
 
 
 
 
 
37
 
38
  }
39
 
 
9
  import numpy as np
10
  import os
11
 
12
+ HF_TOKEN = os.environ['HF_TOKEN']
13
  # subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
14
 
15
  # models = {
 
33
  return full_path
34
 
35
  models = {
36
+ "Qwen/Qwen2-VL-72B-Instruct": Qwen2VLForConditionalGeneration.from_pretrained(
37
+ "Qwen/Qwen2-VL-72B-Instruct",
38
+ trust_remote_code=True,
39
+ token=HF_TOKEN,
40
+ torch_dtype=torch.bfloat16
41
+ ).cuda().eval()
42
 
43
  }
44