Spaces:
Build error
Build error
Commit
·
07dc786
1
Parent(s):
804883d
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ import requests
|
|
7 |
from io import BytesIO
|
8 |
|
9 |
# Carregar o modelo Qwen-VL e o tokenizer
|
10 |
-
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-VL", trust_remote_code=True)
|
11 |
-
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL",load_in_4bit=True, device_map="auto", trust_remote_code=True).eval()
|
12 |
|
13 |
def generate_predictions(image_input, text_input):
|
14 |
# Inverter a imagem para corrigir o negativo
|
|
|
7 |
from io import BytesIO
|
8 |
|
9 |
# Carregar o modelo Qwen-VL e o tokenizer
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-VL-Chat-Int4", trust_remote_code=True)
|
11 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL-Chat-Int4",load_in_4bit=True, device_map="auto", trust_remote_code=True).eval()
|
12 |
|
13 |
def generate_predictions(image_input, text_input):
|
14 |
# Inverter a imagem para corrigir o negativo
|