mirror of
https://github.com/OpenBMB/MiniCPM-V.git
synced 2026-02-05 10:19:18 +08:00
Update readme
This commit is contained in:
@@ -340,7 +340,7 @@ im_64 = img2base64('./assets/worldmap_ck.jpg')
|
|||||||
msgs = [{"role": "user", "content": "What is interesting about this image?"}]
|
msgs = [{"role": "user", "content": "What is interesting about this image?"}]
|
||||||
|
|
||||||
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
||||||
answer = chat_model.process(inputs)
|
answer = chat_model.chat(inputs)
|
||||||
print(answer)
|
print(answer)
|
||||||
|
|
||||||
# Second round chat
|
# Second round chat
|
||||||
@@ -349,7 +349,7 @@ msgs.append({"role": "assistant", "content": answer})
|
|||||||
msgs.append({"role": "user", "content": "Where is China in the image"})
|
msgs.append({"role": "user", "content": "Where is China in the image"})
|
||||||
|
|
||||||
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
||||||
answer = chat_model.process(inputs)
|
answer = chat_model.chat(inputs)
|
||||||
print(answer)
|
print(answer)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ im_64 = img2base64('./assets/worldmap_ck.jpg')
|
|||||||
msgs = [{"role": "user", "content": "What is interesting about this image?"}]
|
msgs = [{"role": "user", "content": "What is interesting about this image?"}]
|
||||||
|
|
||||||
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
||||||
answer = chat_model.process(inputs)
|
answer = chat_model.chat(inputs)
|
||||||
print(answer)
|
print(answer)
|
||||||
|
|
||||||
# Second round chat
|
# Second round chat
|
||||||
@@ -357,7 +357,7 @@ msgs.append({"role": "assistant", "content": answer})
|
|||||||
msgs.append({"role": "user", "content": "Where is China in the image"})
|
msgs.append({"role": "user", "content": "Where is China in the image"})
|
||||||
|
|
||||||
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
inputs = {"image": im_64, "question": json.dumps(msgs)}
|
||||||
answer = chat_model.process(inputs)
|
answer = chat_model.chat(inputs)
|
||||||
print(answer)
|
print(answer)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user