Vidushee commited on
Commit
be7703f
·
verified ·
1 Parent(s): 0199f59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -3,13 +3,10 @@ import torch
3
  from transformers import BitsAndBytesConfig, pipeline
4
 
5
  # Load model directly
6
- quantization_config = BitsAndBytesConfig(
7
- load_in_4bit=True,
8
- bnb_4bit_compute_dtype=torch.float16
9
- )
10
 
11
  model_id = "liuhaotian/llava-v1.5-13b-shard3gb"
12
- pipe = pipeline("image-to-text", model=model_id, model_kwargs={"quantization_config": quantization_config})
13
 
14
  def generate_text(image):
15
  max_new_tokens = 200
 
3
  from transformers import BitsAndBytesConfig, pipeline
4
 
5
  # Load model directly
6
+
 
 
 
7
 
8
  model_id = "liuhaotian/llava-v1.5-13b-shard3gb"
9
+ pipe = pipeline("image-to-text", model=model_id)
10
 
11
  def generate_text(image):
12
  max_new_tokens = 200