Spaces:
Build error
Build error
Commit
·
bb80f3d
1
Parent(s):
07dc786
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-Chat
|
11 |
-
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL-Chat
|
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", trust_remote_code=True)
|
11 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL-Chat",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
|