Spaces:
Running
Running
Update chatbot.py
Browse files- chatbot.py +3 -0
chatbot.py
CHANGED
@@ -25,6 +25,9 @@ import cv2
|
|
25 |
import re
|
26 |
import io # Add this import for working with image bytes
|
27 |
|
|
|
|
|
|
|
28 |
model_id = "llava-hf/llava-interleave-qwen-7b-dpo-hf"
|
29 |
processor = LlavaProcessor.from_pretrained(model_id)
|
30 |
model = LlavaForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.float16, use_flash_attention_2=True, low_cpu_mem_usage=True)
|
|
|
25 |
import re
|
26 |
import io # Add this import for working with image bytes
|
27 |
|
28 |
+
# You can also use models that are commented below
|
29 |
+
# model_id = "llava-hf/llava-interleave-qwen-0.5b-hf"
|
30 |
+
# model_id = "llava-hf/llava-interleave-qwen-7b-hf"
|
31 |
model_id = "llava-hf/llava-interleave-qwen-7b-dpo-hf"
|
32 |
processor = LlavaProcessor.from_pretrained(model_id)
|
33 |
model = LlavaForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.float16, use_flash_attention_2=True, low_cpu_mem_usage=True)
|