Visual Question Answering
Transformers
TensorBoard
Safetensors
internvl_chat
feature-extraction
custom_code
czczup commited on
Commit
8ac6dc0
1 Parent(s): a4beb5a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -2
README.md CHANGED
@@ -130,12 +130,18 @@ generation_config = dict(
130
  do_sample=False,
131
  )
132
 
 
133
  question = "请详细描述图片"
134
- response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None)
 
 
 
 
 
135
  print(question, response)
136
 
137
  question = "请根据图片写一首诗"
138
- response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history)
139
  print(question, response)
140
  ```
141
 
 
130
  do_sample=False,
131
  )
132
 
133
+ # single-round conversation
134
  question = "请详细描述图片"
135
+ response = model.chat(tokenizer, pixel_values, question, generation_config)
136
+ print(question, response)
137
+
138
+ # multi-round conversation
139
+ question = "请详细描述图片"
140
+ response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None, return_history=True)
141
  print(question, response)
142
 
143
  question = "请根据图片写一首诗"
144
+ response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history, return_history=True)
145
  print(question, response)
146
  ```
147