Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 =
|
| 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,
|