davidr99 commited on
Commit
6dd4559
·
verified ·
1 Parent(s): 41bf7ae

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -104,7 +104,7 @@ def run(image: Image.Image | None, instruction: str, max_new_tokens: int = 768):
104
  {"type": "image", "image": image},
105
  {"type": "text", "text": instruction},
106
  ]}]
107
- prompt = processor.apply_chat_template(msgs, add_generation_prompt=True, tokenize=False)
108
  inputs = processor(text=prompt, images=[image], return_tensors="pt").to(device)
109
  out = model.generate(
110
  **inputs,
 
104
  {"type": "image", "image": image},
105
  {"type": "text", "text": instruction},
106
  ]}]
107
+ prompt = processor.apply_chat_template(msgs, add_generation_prompt=True, enable_thinking=True, tokenize=False)
108
  inputs = processor(text=prompt, images=[image], return_tensors="pt").to(device)
109
  out = model.generate(
110
  **inputs,