YC-Chen commited on
Commit
3f2b6af
·
verified ·
1 Parent(s): 3112358

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -3
README.md CHANGED
@@ -82,17 +82,19 @@ print(result)
82
 
83
  ## Feature: Visual Instruction Following
84
 
 
 
85
  ```python
86
  conversations = [
87
- # {"role": "system", "content": sys_prompt},
88
  {"role": "user", "content": [
89
  {
90
  "type": "image",
91
- "image_path": "image.jpg",
92
  },
93
  {
94
  "type": "text",
95
- "text": "請問這是哪裡?"
96
  },
97
  ]},
98
  ]
@@ -101,6 +103,7 @@ prompt, pixel_values = prompt_engine.get_prompt(conversations)
101
  output_str = _inference(tokenizer, model, generation_config, prompt, pixel_values=pixel_values)
102
  result = prompt_engine.parse_generated_str(output_str)
103
  print(result)
 
104
  ```
105
 
106
 
 
82
 
83
  ## Feature: Visual Instruction Following
84
 
85
+ ![img_example](misc/img_example.jpg)
86
+
87
  ```python
88
  conversations = [
89
+ {"role": "system", "content": sys_prompt},
90
  {"role": "user", "content": [
91
  {
92
  "type": "image",
93
+ "image_path": image_path,
94
  },
95
  {
96
  "type": "text",
97
+ "text": "請問前三名共可獲得多少錢?"
98
  },
99
  ]},
100
  ]
 
103
  output_str = _inference(tokenizer, model, generation_config, prompt, pixel_values=pixel_values)
104
  result = prompt_engine.parse_generated_str(output_str)
105
  print(result)
106
+ # {'role': 'assistant', 'content': '第一名可獲得30萬元,第二名可獲得20萬元,第三名可獲得15萬元。前三名共計65萬元。'}
107
  ```
108
 
109