From e8df476ac577e25d0bc28a95ca530048e6ef5d05 Mon Sep 17 00:00:00 2001 From: Hongji Zhu Date: Mon, 15 Apr 2024 10:44:21 +0800 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 964790c..056be2e 100644 --- a/README.md +++ b/README.md @@ -535,7 +535,7 @@ pip install -r requirements.txt ```python from chat import OmniLMMChat, img2base64 -chat_model = OmniLMMChat('openbmb/OmniLMM-12B') # or 'openbmb/MiniCPM-V-2' +chat_model = OmniLMMChat('openbmb/MiniCPM-V-2') # or 'openbmb/OmniLMM-12B' im_64 = img2base64('./assets/hk_OCR.jpg') @@ -576,10 +576,10 @@ import torch from PIL import Image from transformers import AutoModel, AutoTokenizer -model = AutoModel.from_pretrained('openbmb/MiniCPM-V-2.0', trust_remote_code=True, torch_dtype=torch.bfloat16) +model = AutoModel.from_pretrained('openbmb/MiniCPM-V-2', trust_remote_code=True, torch_dtype=torch.bfloat16) model = model.to(device='mps', dtype=torch.float16) -tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V-2.0', trust_remote_code=True) +tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V-2', trust_remote_code=True) model.eval() image = Image.open('./assets/hk_OCR.jpg').convert('RGB')