czczup commited on
Commit
fed2e7c
1 Parent(s): 9d88fd9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -2
README.md CHANGED
@@ -84,12 +84,18 @@ generation_config = dict(
84
  do_sample=False,
85
  )
86
 
 
87
  question = "请详细描述图片"
88
- response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None)
 
 
 
 
 
89
  print(question, response)
90
 
91
  question = "请根据图片写一首诗"
92
- response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history)
93
  print(question, response)
94
  ```
95
 
 
84
  do_sample=False,
85
  )
86
 
87
+ # single-round conversation
88
  question = "请详细描述图片"
89
+ response = model.chat(tokenizer, pixel_values, question, generation_config)
90
+ print(question, response)
91
+
92
+ # multi-round conversation
93
+ question = "请详细描述图片"
94
+ response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None, return_history=True)
95
  print(question, response)
96
 
97
  question = "请根据图片写一首诗"
98
+ response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history, return_history=True)
99
  print(question, response)
100
  ```
101