Spaces:
Build error
Build error
Commit
·
101c1f1
1
Parent(s):
2dc65e1
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,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",
|
12 |
|
13 |
def generate_predictions(image_input, text_input):
|
14 |
# Inverter a imagem para corrigir o negativo
|
|
|
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", 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
|