Spaces:
Build error
Build error
Commit
·
3944bd4
1
Parent(s):
0d12e2f
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ import re
|
|
6 |
import requests
|
7 |
from io import BytesIO
|
8 |
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-
|
10 |
-
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-
|
11 |
|
12 |
def generate_predictions(image_input, text_input, with_grounding):
|
13 |
user_image_path = "/tmp/user_input_test_image.jpg"
|
|
|
6 |
import requests
|
7 |
from io import BytesIO
|
8 |
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-VL-Chat-Int4", trust_remote_code=True)
|
10 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL-Chat-Int4", device_map="auto", trust_remote_code=True).eval()
|
11 |
|
12 |
def generate_predictions(image_input, text_input, with_grounding):
|
13 |
user_image_path = "/tmp/user_input_test_image.jpg"
|