merve HF staff commited on
Commit
c25614a
1 Parent(s): c18188c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -1
app.py CHANGED
@@ -10,7 +10,6 @@ import subprocess
10
 
11
 
12
  processor = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM-Instruct")
13
- processor.chat_template = "{'chat_template': '<|begin_of_text|>{% for message in messages %}{{message['role'].capitalize()}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance>\n{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}'}"
14
  model = AutoModelForVision2Seq.from_pretrained("HuggingFaceTB/SmolVLM-Instruct",
15
  torch_dtype=torch.bfloat16,
16
  #_attn_implementation="flash_attention_2"
 
10
 
11
 
12
  processor = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM-Instruct")
 
13
  model = AutoModelForVision2Seq.from_pretrained("HuggingFaceTB/SmolVLM-Instruct",
14
  torch_dtype=torch.bfloat16,
15
  #_attn_implementation="flash_attention_2"