artificialguybr commited on
Commit
4c92950
1 Parent(s): 3f49fe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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", trust_remote_code=True)
11
- model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL", device_map="cuda", trust_remote_code=True).eval()
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", 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