Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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"
|