merve HF staff commited on
Commit
8640a7d
·
verified ·
1 Parent(s): 49dd4f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from transformers import AutoProcessor, AutoModelForVision2Seq, TextIteratorStreamer
3
  from threading import Thread
4
  import re
5
  import time
@@ -11,7 +11,7 @@ subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENT
11
  from io import BytesIO
12
 
13
  processor = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM2-2.2B-Instruct")
14
- model = AutoModelForVision2Seq.from_pretrained("HuggingFaceTB/SmolVLM2-2.2B-Instruct",
15
  _attn_implementation="flash_attention_2",
16
  torch_dtype=torch.bfloat16).to("cuda:0")
17
 
 
1
  import gradio as gr
2
+ from transformers import AutoProcessor, AutoModelForImageTextToText, TextIteratorStreamer
3
  from threading import Thread
4
  import re
5
  import time
 
11
  from io import BytesIO
12
 
13
  processor = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM2-2.2B-Instruct")
14
+ model = AutoModelForImageTextToText.from_pretrained("HuggingFaceTB/SmolVLM2-2.2B-Instruct",
15
  _attn_implementation="flash_attention_2",
16
  torch_dtype=torch.bfloat16).to("cuda:0")
17