Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,10 @@ import torch
|
|
3 |
from transformers import BitsAndBytesConfig, pipeline
|
4 |
|
5 |
# Load model directly
|
6 |
-
|
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
|
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
|