crystal-technologies commited on
Commit
21c32dd
·
1 Parent(s): e3e15c4

Update CircumSpect/vqa/vqa.py

Browse files
Files changed (1) hide show
  1. CircumSpect/vqa/vqa.py +4 -1
CircumSpect/vqa/vqa.py CHANGED
@@ -11,6 +11,7 @@ from io import BytesIO
11
  from PIL import Image
12
  import requests
13
  import torch
 
14
 
15
  device = setup_device()
16
 
@@ -26,7 +27,9 @@ def load_image(image_file):
26
 
27
  disable_torch_init()
28
 
29
- model_path = "models/CRYSTAL-vision"
 
 
30
  model_base = None
31
  conv_mode = None
32
  temperature = 0.2
 
11
  from PIL import Image
12
  import requests
13
  import torch
14
+ import os
15
 
16
  device = setup_device()
17
 
 
27
 
28
  disable_torch_init()
29
 
30
+ model_name = os.environ.get('VLM_MODEL')
31
+
32
+ model_path = "models/CRYSTAL-vision" if model_name != None else model_name
33
  model_base = None
34
  conv_mode = None
35
  temperature = 0.2