Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ print(f"[SYSTEM] | Using {DEVICE} type compute device.")
|
|
18 |
DEFAULT_INPUT = "Describe in one paragraph."
|
19 |
MAX_FRAMES = 64
|
20 |
|
21 |
-
model_name = "openbmb/MiniCPM-o-2_6"
|
22 |
|
23 |
repo = AutoModel.from_pretrained(model_name, trust_remote_code=True, attn_implementation="sdpa", torch_dtype=torch.bfloat16).to(DEVICE)
|
24 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
@@ -74,7 +74,7 @@ def generate(image, video, audio, instruction=DEFAULT_INPUT, sampling=False, tem
|
|
74 |
params = {
|
75 |
"image": media,
|
76 |
"msgs": inputs,
|
77 |
-
|
78 |
#"processor": processor,
|
79 |
"sampling": sampling,
|
80 |
"temperature": temperature,
|
|
|
18 |
DEFAULT_INPUT = "Describe in one paragraph."
|
19 |
MAX_FRAMES = 64
|
20 |
|
21 |
+
model_name = "openbmb/MiniCPM-o-2_6-int4"#"openbmb/MiniCPM-o-2_6"
|
22 |
|
23 |
repo = AutoModel.from_pretrained(model_name, trust_remote_code=True, attn_implementation="sdpa", torch_dtype=torch.bfloat16).to(DEVICE)
|
24 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
|
|
74 |
params = {
|
75 |
"image": media,
|
76 |
"msgs": inputs,
|
77 |
+
"tokenizer": tokenizer,
|
78 |
#"processor": processor,
|
79 |
"sampling": sampling,
|
80 |
"temperature": temperature,
|