lokijii commited on
Commit
ebbf7cc
1 Parent(s): 3a5d069

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig, TextStreamer
3
  import torch
4
  from PIL import Image
5
  import re
@@ -33,7 +33,7 @@ device_map = "auto"
33
  tokenizer = AutoTokenizer.from_pretrained(
34
  DEFAULT_CKPT_PATH, trust_remote_code=True,
35
  )
36
- model = AutoModelForCausalLM.from_pretrained(
37
  DEFAULT_CKPT_PATH,
38
  device_map=device_map,
39
  trust_remote_code=True,
 
1
  import gradio as gr
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig, TextStreamer, Qwen2VLForConditionalGeneration
3
  import torch
4
  from PIL import Image
5
  import re
 
33
  tokenizer = AutoTokenizer.from_pretrained(
34
  DEFAULT_CKPT_PATH, trust_remote_code=True,
35
  )
36
+ model = Qwen2VLForConditionalGeneration.from_pretrained(
37
  DEFAULT_CKPT_PATH,
38
  device_map=device_map,
39
  trust_remote_code=True,